Hugh McMaster : reg/tests: Pass MultiByteToWideChar() the buffer size in characters.
Alexandre Julliard
julliard at winehq.org
Wed Aug 23 19:54:08 CDT 2017
Module: wine
Branch: master
Commit: c618e99475f201a68d427132338a95a8812c43f6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c618e99475f201a68d427132338a95a8812c43f6
Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date: Wed Aug 23 12:31:47 2017 +0000
reg/tests: Pass MultiByteToWideChar() the buffer size in characters.
Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/reg/tests/reg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/programs/reg/tests/reg.c b/programs/reg/tests/reg.c
index b042614..0a2fdbf 100644
--- a/programs/reg/tests/reg.c
+++ b/programs/reg/tests/reg.c
@@ -766,7 +766,7 @@ static BOOL test_import_wstr_(unsigned line, const char *file_contents, DWORD *r
memsize = len * sizeof(WCHAR);
wstr = HeapAlloc(GetProcessHeap(), 0, memsize);
if (!wstr) return FALSE;
- MultiByteToWideChar(CP_UTF8, 0, file_contents, lenA, wstr, memsize);
+ MultiByteToWideChar(CP_UTF8, 0, file_contents, lenA, wstr, len);
regfile = CreateFileA("test.reg", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, NULL);
More information about the wine-cvs
mailing list