Commit 717109ce authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

comctl32/tests: Don't read past the end of the buffer.

Fixes test failures uncovered by f8979fee. Signed-off-by: 's avatarMichael Stefaniuc <mstefani@winehq.org> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 4928f513
...@@ -1010,8 +1010,9 @@ static void test_notify_generic_text_helper(HWND pager, const struct generic_tex ...@@ -1010,8 +1010,9 @@ static void test_notify_generic_text_helper(HWND pager, const struct generic_tex
if (data->return_text) if (data->return_text)
{ {
if (para->flags & CONVERT_RECEIVE) if (para->flags & CONVERT_RECEIVE)
ok(!lstrcmpW(data->return_text, *para->text), "Code 0x%08x sub test %d expect %s, got %s\n", ok(!wcsncmp(data->return_text, *para->text, *para->text_max),
para->code_unicode, i, wine_dbgstr_w((WCHAR *)data->return_text), wine_dbgstr_w(*para->text)); "Code 0x%08x sub test %d expect %s, got %s\n", para->code_unicode, i,
wine_dbgstr_w((WCHAR *)data->return_text), wine_dbgstr_w(*para->text));
else else
ok(!lstrcmpA(data->return_text, (CHAR *)*para->text), "Code 0x%08x sub test %d expect %s, got %s\n", ok(!lstrcmpA(data->return_text, (CHAR *)*para->text), "Code 0x%08x sub test %d expect %s, got %s\n",
para->code_unicode, i, (CHAR *)data->return_text, (CHAR *)*para->text); para->code_unicode, i, (CHAR *)data->return_text, (CHAR *)*para->text);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment