[PATCH 2/4] regedit: Simplify parseKeyName()
Alexandre Julliard
julliard at winehq.org
Mon Apr 24 13:33:46 CDT 2017
Hugh McMaster <hugh.mcmaster at 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 at winehq.org
More information about the wine-devel
mailing list