summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/serialport/qserialport_wince.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/serialport/qserialport_wince.cpp b/src/serialport/qserialport_wince.cpp
index 86bb83f3..453769ef 100644
--- a/src/serialport/qserialport_wince.cpp
+++ b/src/serialport/qserialport_wince.cpp
@@ -528,7 +528,7 @@ bool QSerialPortPrivate::notifyRead()
return false;
}
- readBuffer.truncate(readBytes);
+ buffer.chop(bytesToRead - qMax(readBytes, DWORD(0)));
// Process emulate policy.
if ((policy != QSerialPort::IgnorePolicy) && parityErrorOccurred) {