summaryrefslogtreecommitdiff
path: root/src/serialport/qserialport_win.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-06-07 12:07:20 +0200
committerLiang Qi <liang.qi@qt.io>2017-06-07 13:31:18 +0200
commit55aa81e9acc736d162d3e4f775814ac91dbf1a80 (patch)
tree6f2965db3b993e8012c65dd291562b1d8d04556a /src/serialport/qserialport_win.cpp
parent65dba188d51d6dc67a15483f26c6b94a21abf5bc (diff)
parenta7594fd4e883a33faffb8340d73547f882eccb29 (diff)
downloadqtserialport-55aa81e9acc736d162d3e4f775814ac91dbf1a80.tar.gz
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: .qmake.conf src/serialport/qserialport_win.cpp Change-Id: Icc832e218a1135cb82e780ccaa63abd990289eaf
Diffstat (limited to 'src/serialport/qserialport_win.cpp')
-rw-r--r--src/serialport/qserialport_win.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/serialport/qserialport_win.cpp b/src/serialport/qserialport_win.cpp
index d6a1d13..7ae40d9 100644
--- a/src/serialport/qserialport_win.cpp
+++ b/src/serialport/qserialport_win.cpp
@@ -537,11 +537,11 @@ bool QSerialPortPrivate::startAsyncRead()
if (readStarted)
return true;
- DWORD bytesToRead = QSERIALPORT_BUFFERSIZE;
+ qint64 bytesToRead = QSERIALPORT_BUFFERSIZE;
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;