[2/2] cabinet: Accept hf == 0 in FDIIsCabinet.

Vincent Povirk madewokherd at gmail.com
Tue Dec 2 16:35:25 CST 2014


-------------- next part --------------
From dbe77e152764ef6aae5d596e93dd9e72cf66025c Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Tue, 2 Dec 2014 16:28:59 -0600
Subject: [PATCH 2/2] cabinet: Accept hf == 0 in FDIIsCabinet.

---
 dlls/cabinet/fdi.c       | 5 -----
 dlls/cabinet/tests/fdi.c | 2 --
 2 files changed, 7 deletions(-)

diff --git a/dlls/cabinet/fdi.c b/dlls/cabinet/fdi.c
index ae0576b..aedd972 100644
--- a/dlls/cabinet/fdi.c
+++ b/dlls/cabinet/fdi.c
@@ -702,11 +702,6 @@ BOOL __cdecl FDIIsCabinet(HFDI hfdi, INT_PTR hf, PFDICABINETINFO pfdici)
 
   if (!fdi) return FALSE;
 
-  if (!hf) {
-    SetLastError(ERROR_INVALID_HANDLE);
-    return FALSE;
-  }
-
   if (!pfdici) {
     SetLastError(ERROR_BAD_ARGUMENTS);
     return FALSE;
diff --git a/dlls/cabinet/tests/fdi.c b/dlls/cabinet/tests/fdi.c
index fe9a2e3..b5bec38 100644
--- a/dlls/cabinet/tests/fdi.c
+++ b/dlls/cabinet/tests/fdi.c
@@ -727,14 +727,12 @@ static void test_FDIIsCabinet(void)
     ZeroMemory(&cabinfo, sizeof(FDICABINETINFO));
     SetLastError(0xdeadbeef);
     ret = FDIIsCabinet(hfdi, 0, &cabinfo);
-todo_wine {
     ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
     ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError());
     ok(cabinfo.cFiles == 4, "Expected 4, got %d\n", cabinfo.cFiles);
     ok(cabinfo.cFolders == 1, "Expected 1, got %d\n", cabinfo.cFolders);
     ok(cabinfo.setID == 0xbeef, "Expected 0xbeef, got %d\n", cabinfo.setID);
     ok(cabinfo.cbCabinet == 182, "Expected 182, got %d\n", cabinfo.cbCabinet);
-}
     ok(cabinfo.iCabinet == 0, "Expected 0, got %d\n", cabinfo.iCabinet);
 
     fdi_close(static_fdi_handle);
-- 
2.1.0



More information about the wine-patches mailing list