24 Apr
2017
24 Apr
'17
6:33 p.m.
Hugh McMaster <hugh.mcmaster(a)outlook.com> writes:
- - for (i = 0; i < ARRAY_SIZE(reg_class_keys); i++) { - if (CompareStringW(LOCALE_USER_DEFAULT, 0, lpKeyName, len, reg_class_namesW[i], -1) == CSTR_EQUAL && - len == lstrlenW(reg_class_namesW[i])) { + num_class_keys = ARRAY_SIZE(reg_class_keys); + for (i = 0; i < num_class_keys; i++) + { + if (!strncmpW(lpKeyName, reg_class_namesW[i], lstrlenW(reg_class_namesW[i]))) + {
You still need to check that the lengths match. -- Alexandre Julliard julliard(a)winehq.org