mirror of
https://github.com/reactos/reactos.git
synced 2024-09-09 20:30:04 +00:00
fix UNICODE string buffer allocation
svn path=/trunk/; revision=10190
This commit is contained in:
parent
f7dff7223a
commit
4afe092bc0
|
@ -171,7 +171,7 @@ inline void assign_utf8(String& s, const char* str)
|
|||
int lutf8 = strlen(str);
|
||||
|
||||
#ifdef UNICODE
|
||||
LPTSTR buffer = (LPTSTR)alloca(lutf8);
|
||||
LPTSTR buffer = (LPTSTR)alloca(sizeof(TCHAR)*lutf8);
|
||||
int l = MultiByteToWideChar(CP_UTF8, 0, str, lutf8, buffer, lutf8);
|
||||
#else
|
||||
LPWSTR wbuffer = (LPWSTR)alloca(sizeof(WCHAR)*lutf8);
|
||||
|
|
Loading…
Reference in a new issue