fix UNICODE string buffer allocation

svn path=/trunk/; revision=10190
This commit is contained in:
Martin Fuchs 2004-07-18 09:20:38 +00:00
parent f7dff7223a
commit 4afe092bc0

View file

@ -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);