diff --git a/base/applications/regedit/find.c b/base/applications/regedit/find.c index df5c0959347..136f88c0ac5 100644 --- a/base/applications/regedit/find.c +++ b/base/applications/regedit/find.c @@ -193,14 +193,14 @@ BOOL RegFindRecurse( qsort(ppszNames, c, sizeof(LPWSTR), compare); if (pszValueName == NULL) - pszValueName = ppszNames[0]; + fPast = TRUE; for(i = 0; i < c; i++) { if (DoEvents()) goto err; - if (!fPast && _wcsicmp(ppszNames[i], pszValueName) == 0) + if (!fPast && pszValueName && _wcsicmp(ppszNames[i], pszValueName) == 0) { fPast = TRUE; continue;