summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2017-05-04 19:10:08 +0300
committerAlex Trotsenko <alex1973tr@gmail.com>2017-05-04 18:01:14 +0000
commit4c465d90c79ab4a9d6f031143cddd0f148d4101b (patch)
tree5623660a5416f5b45ae8d841f76bb79c83de1bc0
parentd88ded29d968b8ccf41d4dffa73c3f8f030a9f5d (diff)
downloadqtserialport-4c465d90c79ab4a9d6f031143cddd0f148d4101b.tar.gz
QSPP::startAsyncRead(): set a correct type for variable
'bytesToRead' takes the result of signed 64-bit computation which could be negative. So, its type should be qint64. Change-Id: Ib51129143fcb70475ad383df417ae4282c858e41 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
-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 0494889..87f9e7b 100644
--- a/src/serialport/qserialport_win.cpp
+++ b/src/serialport/qserialport_win.cpp
@@ -541,7 +541,7 @@ bool QSerialPortPrivate::startAsyncRead()
if (readStarted)
return true;
- DWORD bytesToRead = ReadChunkSize;
+ qint64 bytesToRead = ReadChunkSize;
if (readBufferMaxSize && bytesToRead > (readBufferMaxSize - buffer.size())) {
bytesToRead = readBufferMaxSize - buffer.size();