summaryrefslogtreecommitdiff
path: root/src/serialport/qserialport_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/serialport/qserialport_win.cpp')
-rw-r--r--src/serialport/qserialport_win.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/serialport/qserialport_win.cpp b/src/serialport/qserialport_win.cpp
index 84bf5b9..0494889 100644
--- a/src/serialport/qserialport_win.cpp
+++ b/src/serialport/qserialport_win.cpp
@@ -545,7 +545,7 @@ bool QSerialPortPrivate::startAsyncRead()
if (readBufferMaxSize && bytesToRead > (readBufferMaxSize - buffer.size())) {
bytesToRead = readBufferMaxSize - buffer.size();
- if (bytesToRead == 0) {
+ if (bytesToRead <= 0) {
// Buffer is full. User must read data from the buffer
// before we can read more from the port.
return false;