diff options
author | Alex Trotsenko <alex1973tr@gmail.com> | 2017-05-04 19:10:08 +0300 |
---|---|---|
committer | Alex Trotsenko <alex1973tr@gmail.com> | 2017-05-04 18:01:14 +0000 |
commit | 4c465d90c79ab4a9d6f031143cddd0f148d4101b (patch) | |
tree | 5623660a5416f5b45ae8d841f76bb79c83de1bc0 /src/serialport | |
parent | d88ded29d968b8ccf41d4dffa73c3f8f030a9f5d (diff) |
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>
Diffstat (limited to 'src/serialport')
-rw-r--r-- | src/serialport/qserialport_win.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/serialport/qserialport_win.cpp b/src/serialport/qserialport_win.cpp index 04948892..87f9e7b6 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(); |