Module: wine Branch: master Commit: c618e99475f201a68d427132338a95a8812c43f6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c618e99475f201a68d42713233...
Author: Hugh McMaster hugh.mcmaster@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@outlook.com Signed-off-by: Alexandre Julliard julliard@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);