Commit 2bacc463 authored by Alexandre Julliard's avatar Alexandre Julliard

Don't convert the return value on failure in VerQueryValueA/W.

parent bc4a576a
...@@ -702,9 +702,7 @@ BOOL WINAPI VerQueryValueA( LPVOID pBlock, LPCSTR lpSubBlock, ...@@ -702,9 +702,7 @@ BOOL WINAPI VerQueryValueA( LPVOID pBlock, LPCSTR lpSubBlock,
HeapFree(GetProcessHeap(), 0, lpSubBlockW); HeapFree(GetProcessHeap(), 0, lpSubBlockW);
if (( !strcasecmp( lpSubBlock, rootA )) || ( !strcasecmp( lpSubBlock, varfileinfoA ))) if (ret && strcasecmp( lpSubBlock, rootA ) && strcasecmp( lpSubBlock, varfileinfoA ))
return ret;
else
{ {
LPSTR lplpBufferA; LPSTR lplpBufferA;
...@@ -720,9 +718,8 @@ BOOL WINAPI VerQueryValueA( LPVOID pBlock, LPCSTR lpSubBlock, ...@@ -720,9 +718,8 @@ BOOL WINAPI VerQueryValueA( LPVOID pBlock, LPCSTR lpSubBlock,
*puLen = len; *puLen = len;
HeapFree(GetProcessHeap(), 0, lplpBufferA); HeapFree(GetProcessHeap(), 0, lplpBufferA);
return ret;
} }
return ret;
} }
return VersionInfo16_QueryValue(info, lpSubBlock, lplpBuffer, puLen); return VersionInfo16_QueryValue(info, lpSubBlock, lplpBuffer, puLen);
...@@ -761,9 +758,7 @@ BOOL WINAPI VerQueryValueW( LPVOID pBlock, LPCWSTR lpSubBlock, ...@@ -761,9 +758,7 @@ BOOL WINAPI VerQueryValueW( LPVOID pBlock, LPCWSTR lpSubBlock,
HeapFree(GetProcessHeap(), 0, lpSubBlockA); HeapFree(GetProcessHeap(), 0, lpSubBlockA);
if (( !strcmpiW( lpSubBlock, rootW )) || ( !strcmpiW( lpSubBlock, varfileinfoW ))) if (ret && strcmpiW( lpSubBlock, rootW ) && strcmpiW( lpSubBlock, varfileinfoW ))
return ret;
else
{ {
LPWSTR lplpBufferW; LPWSTR lplpBufferW;
...@@ -779,9 +774,8 @@ BOOL WINAPI VerQueryValueW( LPVOID pBlock, LPCWSTR lpSubBlock, ...@@ -779,9 +774,8 @@ BOOL WINAPI VerQueryValueW( LPVOID pBlock, LPCWSTR lpSubBlock,
*puLen = len; *puLen = len;
HeapFree(GetProcessHeap(), 0, lplpBufferW); HeapFree(GetProcessHeap(), 0, lplpBufferW);
return ret;
} }
return ret;
} }
return VersionInfo32_QueryValue(info, lpSubBlock, lplpBuffer, puLen); return VersionInfo32_QueryValue(info, lpSubBlock, lplpBuffer, puLen);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment