Author: fireball
Date: Mon Jul 10 12:33:02 2006
New Revision: 22990
URL:
http://svn.reactos.org/svn/reactos?rev=22990&view=rev
Log:
Dmitry Philippov: Fix a bug with firstly overwriting the value, and then trying to use
variable for comparation (should be vice-versa: firstly compared what was passed, then
overwrite with a new value)
Modified:
trunk/reactos/dll/win32/kernel32/misc/comm.c
Modified: trunk/reactos/dll/win32/kernel32/misc/comm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/co…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/comm.c (original)
+++ trunk/reactos/dll/win32/kernel32/misc/comm.c Mon Jul 10 12:33:02 2006
@@ -971,7 +971,6 @@
lpCC->wReserved = 0;
lpCC->dwProviderSubType = lpComPort->dwProvSubType;
lpCC->dwProviderSize = lpComPort->dwProvSpec2;
- *lpdwSize = lpCC->dwSize+lpCC->dwProviderSize;
if( 0 == lpComPort->dwProvSpec2 ) {
lpCC->dwProviderOffset = 0;
} else {
@@ -985,6 +984,7 @@
RtlCopyMemory(lpCC->wcProviderData, lpComPort->wcProvChar,
lpCC->dwProviderSize);
ReturnValue = GetCommState(hCommDev, &lpCC->dcb);
}
+ *lpdwSize = lpCC->dwSize+lpCC->dwProviderSize;
}
}