Module: wine Branch: master Commit: c4eeb9f6fae56a6e85b847a03a78ec0e1fde01c3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c4eeb9f6fae56a6e85b847a03a...
Author: Rob Shearman rob@codeweavers.com Date: Thu May 10 14:25:39 2007 +0100
setupapi: SetupOpenInfFile returns INVALID_HANDLE_VALUE on failure, not NULL.
Fix SetupQueryInfOriginalFileInformation to check for the former rather than the latter.
---
dlls/setupapi/query.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/setupapi/query.c b/dlls/setupapi/query.c index cd50dee..8699264 100644 --- a/dlls/setupapi/query.c +++ b/dlls/setupapi/query.c @@ -672,7 +672,7 @@ BOOL WINAPI SetupQueryInfOriginalFileInformationW( * the original inf file and cache it, but that would require building a * .pnf file. */ hinf = SetupOpenInfFileW(inf_path, NULL, INF_STYLE_WIN4, NULL); - if (!hinf) return FALSE; + if (hinf == INVALID_HANDLE_VALUE) return FALSE;
if (!SetupGetLineTextW(NULL, hinf, wszVersion, wszCatalogFile, OriginalFileInfo->OriginalCatalogName,