summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkh1 <qt-info@nokia.com>2009-11-11 14:05:28 (GMT)
committerkh1 <qt-info@nokia.com>2009-11-11 14:09:28 (GMT)
commit7af4abab649d1ea4f9c8289a58b9d479237bd815 (patch)
tree35fca5ae64112b497f20b180f5d5dbdab8d471d5
parent55b8a57350fee26783b379d3897d38759903824f (diff)
downloadQt-7af4abab649d1ea4f9c8289a58b9d479237bd815.zip
Qt-7af4abab649d1ea4f9c8289a58b9d479237bd815.tar.gz
Qt-7af4abab649d1ea4f9c8289a58b9d479237bd815.tar.bz2
On windows we need to pass the length read to function properly.
The buffer might still contain garbage from an already received command. Reviewed-by: ck
-rw-r--r--tools/assistant/tools/assistant/remotecontrol.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/assistant/tools/assistant/remotecontrol.cpp b/tools/assistant/tools/assistant/remotecontrol.cpp
index 474a681..ac7e16f 100644
--- a/tools/assistant/tools/assistant/remotecontrol.cpp
+++ b/tools/assistant/tools/assistant/remotecontrol.cpp
@@ -97,9 +97,9 @@ void StdInListenerWin::run()
#endif
while (ok) {
- ok = ReadFile(hStdinDup, chBuf, 4096, &dwRead, NULL);
+ ok = ReadFile(hStdinDup, chBuf, sizeof(chBuf), &dwRead, NULL);
if (ok && dwRead != 0)
- emit receivedCommand(QString::fromLocal8Bit(chBuf));
+ emit receivedCommand(QString::fromLocal8Bit(chBuf, dwRead));
}
}
#endif