32/16 bit comparison in int21.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Fixing a problem with a 16bit Winzip self-extracting exe.

Changelog:

	msdos	: int21.c
	Fix two comparisons between a 32 bit register with a 16 bit
	error code.

Rein.	
-- 
Rein Klazes
rklazes@xs4all.nl
--- wine/msdos/int21.c	2003-03-04 11:20:20.000000000 +0100
+++ mywine/msdos/int21.c	2003-03-20 17:30:59.000000000 +0100
@@ -718,7 +718,7 @@
         sprintf( p, "wine%04x.%03d", (int)getpid(), counter );
         counter = (counter + 1) % 1000;
 
-        if ((SET_AX( context, _lcreat16_uniq( name, 0 ))) != (WORD)HFILE_ERROR16)
+        if ((WORD) SET_AX( context, _lcreat16_uniq( name, 0 )) != (WORD)HFILE_ERROR16)
         {
             TRACE("created %s\n", name );
             return TRUE;
@@ -1392,10 +1392,10 @@
 	    TRACE(" LONG FILENAME - FIND FIRST MATCHING FILE for %s\n",
 		  (LPCSTR)CTX_SEG_OFF_TO_LIN(context, context->SegDs,context->Edx));
             /* FIXME: use attributes in CX */
-            if ((SET_AX( context, FindFirstFile16(
+            if ( (WORD) SET_AX( context, FindFirstFile16(
                    CTX_SEG_OFF_TO_LIN(context, context->SegDs,context->Edx),
                    (WIN32_FIND_DATAA *)CTX_SEG_OFF_TO_LIN(context, context->SegEs,
-                                                          context->Edi))))
+                                                          context->Edi)))
 		== INVALID_HANDLE_VALUE16)
 		bSetDOSExtendedError = TRUE;
             break;

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux