From 5cb30bbf6ef754e589c2ddfc42ae7a9cf06ace21 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 15 Dec 2017 18:47:14 +0100 Subject: [PATCH] cabinet: Treat only -1 as an error from the FDICopy callback. Signed-off-by: Alexandre Julliard --- dlls/cabinet/fdi.c | 4 ++-- dlls/cabinet/tests/fdi.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/cabinet/fdi.c b/dlls/cabinet/fdi.c index 758133e2355..777174b4d15 100644 --- a/dlls/cabinet/fdi.c +++ b/dlls/cabinet/fdi.c @@ -2496,7 +2496,7 @@ BOOL __cdecl FDICopy( fdin.psz2 = (CAB(mii).nextinfo) ? CAB(mii).nextinfo : &emptystring; fdin.psz3 = pszCabPath; - if (((*pfnfdin)(fdintCABINET_INFO, &fdin))) { + if (pfnfdin(fdintCABINET_INFO, &fdin) == -1) { set_error( fdi, FDIERROR_USER_ABORT, 0 ); goto bail_and_fail; } @@ -2623,7 +2623,7 @@ BOOL __cdecl FDICopy( fdin.psz2 = (CAB(mii).prevname) ? CAB(mii).prevname : &emptystring; fdin.psz3 = (CAB(mii).previnfo) ? CAB(mii).previnfo : &emptystring; - if (((*pfnfdin)(fdintPARTIAL_FILE, &fdin))) { + if (pfnfdin(fdintPARTIAL_FILE, &fdin) == -1) { set_error( fdi, FDIERROR_USER_ABORT, 0 ); goto bail_and_fail; } diff --git a/dlls/cabinet/tests/fdi.c b/dlls/cabinet/tests/fdi.c index ba622f6b41b..80f6a3c5716 100644 --- a/dlls/cabinet/tests/fdi.c +++ b/dlls/cabinet/tests/fdi.c @@ -744,7 +744,7 @@ static void test_FDIIsCabinet(void) static INT_PTR __cdecl CopyProgress(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin) { - return 0; + return 37; /* doc says 0, but anything != -1 apparently means success as well */ } static INT_PTR CDECL fdi_mem_open(char *name, int oflag, int pmode)