mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-05-01 01:21:41 -04:00
safe compile .
This commit is contained in:
parent
00753d2ff2
commit
d1a32df54b
3 changed files with 6 additions and 6 deletions
|
@ -323,10 +323,10 @@ struct XCString
|
|||
|
||||
bUsedDefault = FALSE;
|
||||
wString = new(WCHAR[len + 1]);
|
||||
memset(wString, 0, (len + 1) * 2);
|
||||
memset(wString, 0, (len + 1) * sizeof(WCHAR));
|
||||
|
||||
//MultiByteToWideChar(CP_ACP, WC_COMPOSITECHECK, cString, len, wString, len+1);
|
||||
mbstowcs(wString, cString, len);
|
||||
size_t convertedSize = 0;
|
||||
mbstowcs_s(&convertedSize, wString, len + 1, cString, len);
|
||||
|
||||
}
|
||||
void SetString(const WCHAR* wString, int len)
|
||||
|
@ -358,7 +358,7 @@ struct XCString
|
|||
CString cString;
|
||||
WCHAR* wString;
|
||||
BOOL bUsedDefault;
|
||||
int len;
|
||||
size_t len;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ static char THIS_FILE[] = __FILE__;
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CViewObjects
|
||||
|
||||
const int valadded = 10000;
|
||||
const size_t valadded = 10000;
|
||||
|
||||
IMPLEMENT_DYNCREATE(CViewObjects, CTreeView)
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ inline CString GetUnitPictureFilename(LPCTSTR lpUnitName, DWORD dwPicIndex)
|
|||
}
|
||||
|
||||
char n[50];
|
||||
itoa(dwPicIndex, n, 10);
|
||||
_itoa_s(dwPicIndex, n, 10);
|
||||
|
||||
|
||||
if (pics.find(artname + n) != pics.end()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue