From dcb9733580a2f2fa7d7d3b6c333f3d0d7e244228 Mon Sep 17 00:00:00 2001 From: Stefan Leichter Date: Sun, 9 Jul 2000 12:19:44 +0000 Subject: [PATCH] Fixes the BuildCommDCBA function. --- misc/comm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/misc/comm.c b/misc/comm.c index 59c3e9749fa..af094273d74 100644 --- a/misc/comm.c +++ b/misc/comm.c @@ -347,6 +347,11 @@ static void comm_waitwrite(struct DosDeviceStruct *ptr) /************************************************************************** * BuildCommDCB (USER.213) + * + * According to the ECMA-234 (368.3) the function will return FALSE on + * success, otherwise it will return -1. + * IF THIS IS NOT CORRECT THE RETURNVALUE CHECK IN BuildCommDCBAndTimeoutsA + * NEEDS TO BE FIXED */ BOOL16 WINAPI BuildCommDCB16(LPCSTR device, LPDCB16 lpdcb) { @@ -1497,7 +1502,7 @@ BOOL WINAPI BuildCommDCBAndTimeoutsA(LPCSTR device, LPDCB lpdcb, char last=temp[strlen(temp)-1]; ret=BuildCommDCB16(device,&dcb16); - if (!ret) + if (ret) return FALSE; lpdcb->BaudRate = dcb16.BaudRate; lpdcb->ByteSize = dcb16.ByteSize;