From 4afe092bc010930be2815877315c07b0b3daaa45 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Sun, 18 Jul 2004 09:20:38 +0000 Subject: [PATCH] fix UNICODE string buffer allocation svn path=/trunk/; revision=10190 --- reactos/subsys/system/explorer/utility/xmlstorage.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/subsys/system/explorer/utility/xmlstorage.h b/reactos/subsys/system/explorer/utility/xmlstorage.h index 57f96b13a41..f979d8ba2b1 100644 --- a/reactos/subsys/system/explorer/utility/xmlstorage.h +++ b/reactos/subsys/system/explorer/utility/xmlstorage.h @@ -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);