summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qwindowspipereader.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-05-07 13:07:34 +0200
committerLiang Qi <liang.qi@qt.io>2017-05-07 13:08:18 +0200
commitd1ea4813458b383e66ce4df69d1833b8b6a279c4 (patch)
tree3bdc16da993e5de56b669e6774fb0748075ddd90 /src/corelib/io/qwindowspipereader.cpp
parent1c87d4e1a1d0e1972f6dc85e55ea9be8a42797ba (diff)
parent0b1ec78c2d4871afcc89d5b046926b88f0819a7c (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
Diffstat (limited to 'src/corelib/io/qwindowspipereader.cpp')
-rw-r--r--src/corelib/io/qwindowspipereader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qwindowspipereader.cpp b/src/corelib/io/qwindowspipereader.cpp
index 8bd8af3f34..b68e9e6d4b 100644
--- a/src/corelib/io/qwindowspipereader.cpp
+++ b/src/corelib/io/qwindowspipereader.cpp
@@ -206,13 +206,13 @@ void QWindowsPipeReader::notified(DWORD errorCode, DWORD numberOfBytesRead)
void QWindowsPipeReader::startAsyncRead()
{
const DWORD minReadBufferSize = 4096;
- DWORD bytesToRead = qMax(checkPipeState(), minReadBufferSize);
+ qint64 bytesToRead = qMax(checkPipeState(), minReadBufferSize);
if (pipeBroken)
return;
if (readBufferMaxSize && bytesToRead > (readBufferMaxSize - readBuffer.size())) {
bytesToRead = readBufferMaxSize - readBuffer.size();
- if (bytesToRead == 0) {
+ if (bytesToRead <= 0) {
// Buffer is full. User must read data from the buffer
// before we can read more from the pipe.
return;