mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-07-17 19:56:38 -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;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue