Author: cwittich
Date: Thu Feb 5 00:50:19 2009
New Revision: 39396
URL:
http://svn.reactos.org/svn/reactos?rev=39396&view=rev
Log:
atl: fixed second buffer size to MBtoWC
Marcus Meissner <marcus at jet.franken.de>
http://www.winehq.org/pipermail/wine-patches/2009-February/068894.html
Modified:
trunk/reactos/dll/win32/atl/registrar.c
Modified: trunk/reactos/dll/win32/atl/registrar.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/atl/registrar.c?…
==============================================================================
--- trunk/reactos/dll/win32/atl/registrar.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/atl/registrar.c [iso-8859-1] Thu Feb 5 00:50:19 2009
@@ -444,7 +444,7 @@
if(regstra) {
len = MultiByteToWideChar(CP_ACP, 0, regstra, reslen, NULL, 0)+1;
regstrw = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
len*sizeof(WCHAR));
- MultiByteToWideChar(CP_ACP, 0, regstra, reslen, regstrw, -1);
+ MultiByteToWideChar(CP_ACP, 0, regstra, reslen, regstrw, len);
regstrw[len-1] = '\0';
hres = string_register(This, regstrw, do_register);
@@ -484,7 +484,7 @@
if(lres == ERROR_SUCCESS) {
len = MultiByteToWideChar(CP_ACP, 0, regstra, filelen, NULL, 0)+1;
regstrw = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len*sizeof(WCHAR));
- MultiByteToWideChar(CP_ACP, 0, regstra, filelen, regstrw, -1);
+ MultiByteToWideChar(CP_ACP, 0, regstra, filelen, regstrw, len);
regstrw[len-1] = '\0';
hres = string_register(This, regstrw, do_register);