mirror of
https://github.com/reactos/reactos.git
synced 2025-01-10 16:18:16 +00:00
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 svn path=/trunk/; revision=39396
This commit is contained in:
parent
f38aaf659b
commit
ca07b1a508
1 changed files with 2 additions and 2 deletions
|
@ -444,7 +444,7 @@ static HRESULT resource_register(Registrar *This, LPCOLESTR resFileName,
|
|||
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 @@ static HRESULT file_register(Registrar *This, LPCOLESTR fileName, BOOL do_regist
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue