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

This commit is contained in:
Alexandre Julliard 2005-08-03 11:04:13 +00:00
parent bc4a576a06
commit 2bacc4631c
1 changed files with 4 additions and 10 deletions

View File

@ -702,9 +702,7 @@ BOOL WINAPI VerQueryValueA( LPVOID pBlock, LPCSTR lpSubBlock,
HeapFree(GetProcessHeap(), 0, lpSubBlockW);
if (( !strcasecmp( lpSubBlock, rootA )) || ( !strcasecmp( lpSubBlock, varfileinfoA )))
return ret;
else
if (ret && strcasecmp( lpSubBlock, rootA ) && strcasecmp( lpSubBlock, varfileinfoA ))
{
LPSTR lplpBufferA;
@ -720,9 +718,8 @@ BOOL WINAPI VerQueryValueA( LPVOID pBlock, LPCSTR lpSubBlock,
*puLen = len;
HeapFree(GetProcessHeap(), 0, lplpBufferA);
return ret;
}
return ret;
}
return VersionInfo16_QueryValue(info, lpSubBlock, lplpBuffer, puLen);
@ -761,9 +758,7 @@ BOOL WINAPI VerQueryValueW( LPVOID pBlock, LPCWSTR lpSubBlock,
HeapFree(GetProcessHeap(), 0, lpSubBlockA);
if (( !strcmpiW( lpSubBlock, rootW )) || ( !strcmpiW( lpSubBlock, varfileinfoW )))
return ret;
else
if (ret && strcmpiW( lpSubBlock, rootW ) && strcmpiW( lpSubBlock, varfileinfoW ))
{
LPWSTR lplpBufferW;
@ -779,9 +774,8 @@ BOOL WINAPI VerQueryValueW( LPVOID pBlock, LPCWSTR lpSubBlock,
*puLen = len;
HeapFree(GetProcessHeap(), 0, lplpBufferW);
return ret;
}
return ret;
}
return VersionInfo32_QueryValue(info, lpSubBlock, lplpBuffer, puLen);