From fb37d215cd31bcd0adafa87c1d216027cff028db Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Wed, 19 Nov 2014 08:55:58 +0100 Subject: [PATCH] regedit: Fix incorrect usage of CompareString in parseKeyName. --- programs/regedit/regproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c index 1adeddf0704..80beb21ffca 100644 --- a/programs/regedit/regproc.c +++ b/programs/regedit/regproc.c @@ -320,7 +320,7 @@ static BOOL parseKeyName(LPWSTR lpKeyName, HKEY *hKey, LPWSTR *lpKeyPath) *hKey = NULL; for (i = 0; i < REG_CLASS_NUMBER; i++) { - if (CompareStringW(LOCALE_USER_DEFAULT, 0, lpKeyName, len, reg_class_namesW[i], len) == CSTR_EQUAL && + if (CompareStringW(LOCALE_USER_DEFAULT, 0, lpKeyName, len, reg_class_namesW[i], -1) == CSTR_EQUAL && len == lstrlenW(reg_class_namesW[i])) { *hKey = reg_class_keys[i]; break;