summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qiodevice_p.h
diff options
context:
space:
mode:
authorAndreas Kling <andreas.kling@nokia.com>2010-07-09 16:59:04 +0200
committerAndreas Kling <andreas.kling@nokia.com>2010-07-09 16:59:04 +0200
commitbd287865d2b57395a340e85f1fac9b7ddff3ec14 (patch)
treeb35a6e587dcac3e9ca3512c596e3ebc9b4dd0c87 /src/corelib/io/qiodevice_p.h
parent63171ddd8ec99d9af17e0adcc2cad61586fed42b (diff)
QIODPLB: Sync behavior of ungetBlock() and ungetChar()
ungetChar() supports ungetting data that didn't originate from the QIODevicePrivateLinearBuffer, so ungetBlock() should too.
Diffstat (limited to 'src/corelib/io/qiodevice_p.h')
-rw-r--r--src/corelib/io/qiodevice_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qiodevice_p.h b/src/corelib/io/qiodevice_p.h
index 4a25562605..1dd51ea8b2 100644
--- a/src/corelib/io/qiodevice_p.h
+++ b/src/corelib/io/qiodevice_p.h
@@ -155,10 +155,10 @@ public:
if ((first - buf) < size) {
// underflow, the existing valid data needs to move to the end of the (potentially bigger) buffer
makeSpace(len + size, freeSpaceAtStart);
- memcpy(first - size, block, size);
}
first -= size;
len += size;
+ memcpy(first, block, size);
}
private: