mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 17:14:41 +00:00
[VERSION] Fix VerQueryValue when return Value is NULL. (#7449)
CORE-19783 Co-authored-by: Timo Kreuzer <timo.kreuzer@reactos.org>
This commit is contained in:
parent
8ba61029e1
commit
551c74123c
1 changed files with 8 additions and 0 deletions
|
@ -979,6 +979,14 @@ static BOOL VersionInfo32_QueryValue( const VS_VERSION_INFO_STRUCT32 *info, LPCW
|
|||
|
||||
/* Return value */
|
||||
*lplpBuffer = VersionInfo32_Value( info );
|
||||
|
||||
#ifdef __REACTOS__
|
||||
/* If the wValueLength is zero, then set a UNICODE_NULL only return string.
|
||||
* Use the NULL terminator from the key string for that. This is what Windows does, too. */
|
||||
if (!info->wValueLength)
|
||||
*lplpBuffer = (PVOID)(info->szKey + wcslen(info->szKey));
|
||||
#endif
|
||||
|
||||
if (puLen)
|
||||
*puLen = info->wValueLength;
|
||||
if (pbText)
|
||||
|
|
Loading…
Reference in a new issue