[ADVAPI32] Fix undue debug print in nominal case (#2734)

In current implementation, when regedit opens HKCR root key, an error is logged
err:(dll/win32/advapi32/reg/hkcr.c:964) Returning 259.
This is not correct as the code 259 is ERROR_NO_MORE_ITEMS which is the nominal return value when end of enumeration is reached.
This commit is contained in:
Kyle Katarn 2020-05-04 22:30:36 +02:00 committed by GitHub
parent 8f5b0d8890
commit 5dfe3455db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -961,7 +961,8 @@ EnumHKCRValue(
if (ErrorCode != ERROR_SUCCESS)
{
/* Most likely ERROR_NO_MORE_ITEMS */
ERR("Returning %d.\n", ErrorCode);
if (ErrorCode != ERROR_NO_MORE_ITEMS)
ERR("Returning %d.\n", ErrorCode);
goto Exit;
}
FallbackValueName[FallbackValueNameLen] = L'\0';