Fix nullptr regression in RegistryUtil::ReadRegistry
authorMichael Schuster <michael@schuster.ms>
Tue, 9 Jun 2020 14:17:04 +0000 (16:17 +0200)
committerKevin Ottens <ervin@ipsquad.net>
Tue, 9 Jun 2020 16:34:43 +0000 (18:34 +0200)
commit2b680cadd3765991f08b439f8ab7effefb1defb6
treeac879075435dcb2d2e51e6fc14305662feb25646
parent24177ec7e4ef1d331fb5bc15533c9d72ac666aa5
Fix nullptr regression in RegistryUtil::ReadRegistry

Merging PR #2057 caused the Windows build to fail:

shell_integration\windows\OCUtil\RegistryUtil.cpp(43): error C2664: 'LSTATUS RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY)': cannot convert argument 3 from 'nullptr' to 'DWORD'

The previous implementation prior the PR supplied NULL as the argument 3 to RegOpenKeyEx,
so it was silently accepted and translated to zero, satisfying the DWORD's type requirement.

Signed-off-by: Michael Schuster <michael@schuster.ms>
shell_integration/windows/OCUtil/RegistryUtil.cpp