From 4c465d90c79ab4a9d6f031143cddd0f148d4101b Mon Sep 17 00:00:00 2001 From: Alex Trotsenko Date: Thu, 4 May 2017 19:10:08 +0300 Subject: 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 --- src/serialport/qserialport_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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(); -- cgit v1.2.1