From d76a16e7c3421dd89ebcbb0927a24aba2428240c Mon Sep 17 00:00:00 2001 From: Rein Klazes Date: Sat, 22 Mar 2003 21:09:32 +0000 Subject: [PATCH] Fix two comparisons between a 32 bit register with a 16 bit error code. --- msdos/int21.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/msdos/int21.c b/msdos/int21.c index ba44a7bfb93..41914e2f2ab 100644 --- a/msdos/int21.c +++ b/msdos/int21.c @@ -718,7 +718,8 @@ static BOOL INT21_CreateTempFile( CONTEXT86 *context ) sprintf( p, "wine%04x.%03d", (int)getpid(), counter ); counter = (counter + 1) % 1000; - if ((SET_AX( context, _lcreat16_uniq( name, 0 ))) != (WORD)HFILE_ERROR16) + SET_AX( context, _lcreat16_uniq( name, 0 ) ); + if (AX_reg(context) != HFILE_ERROR16) { TRACE("created %s\n", name ); return TRUE; @@ -1392,11 +1393,11 @@ void WINAPI INT_Int21Handler( CONTEXT86 *context ) 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( - CTX_SEG_OFF_TO_LIN(context, context->SegDs,context->Edx), - (WIN32_FIND_DATAA *)CTX_SEG_OFF_TO_LIN(context, context->SegEs, - context->Edi)))) - == INVALID_HANDLE_VALUE16) + 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))); + if (AX_reg(context) == INVALID_HANDLE_VALUE16) bSetDOSExtendedError = TRUE; break; case 0x4f: /* Find next file */ -- 2.11.4.GIT