Commit d402df31 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Fix name comparison in find_class.

parent 0b350ab9
...@@ -1049,6 +1049,11 @@ if (0) { /* crashes under XP */ ...@@ -1049,6 +1049,11 @@ if (0) { /* crashes under XP */
ok(ret, "GetClassInfoExA() error %ld\n", GetLastError()); ok(ret, "GetClassInfoExA() error %ld\n", GetLastError());
ok(wcx.cbSize == sizeof(wcx) + 1, "expected sizeof(wcx)+1, got %u\n", wcx.cbSize); ok(wcx.cbSize == sizeof(wcx) + 1, "expected sizeof(wcx)+1, got %u\n", wcx.cbSize);
ok(wcx.lpfnWndProc != NULL, "got null proc\n"); ok(wcx.lpfnWndProc != NULL, "got null proc\n");
wcx.cbSize = sizeof(wcx);
ret = GetClassInfoExA(0, "stati", &wcx);
ok(!ret && GetLastError() == ERROR_CLASS_DOES_NOT_EXIST,
"GetClassInfoExA() returned %x %ld\n", ret, GetLastError());
} }
static void test_icons(void) static void test_icons(void)
......
...@@ -259,7 +259,8 @@ static CLASS *find_class( HINSTANCE module, UNICODE_STRING *name ) ...@@ -259,7 +259,8 @@ static CLASS *find_class( HINSTANCE module, UNICODE_STRING *name )
} }
else else
{ {
if (wcsnicmp( class->name, name->Buffer, name->Length / sizeof(WCHAR) )) continue; if (wcsnicmp( class->name, name->Buffer, name->Length / sizeof(WCHAR) ) ||
class->name[name->Length / sizeof(WCHAR)]) continue;
} }
if (!class->local || !module || (class->instance & ~0xffff) == instance) if (!class->local || !module || (class->instance & ~0xffff) == instance)
{ {
......
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