Fix regression introduced in 1e6b424b692b20dcfec920f8d3563e520ec1ff05
commitb7692016f282251002b3e85dfcb5567bd91a12c0
authorJoão Abecasis <joao@abecasis.name>
Fri, 20 Nov 2009 12:50:41 +0000 (20 13:50 +0100)
committerJoão Abecasis <joao@abecasis.name>
Fri, 20 Nov 2009 15:33:00 +0000 (20 16:33 +0100)
treeac3ba927000938e56508c06ddcce6e5f06430357
parentbda75bfc7cf0137474005a0a733ff83e2aae16e9
Fix regression introduced in 1e6b424b692b20dcfec920f8d3563e520ec1ff05

When processing the result of QIODevice::readLine, forgot to take into
account that a '\0' is appended to the array. The terminating character
is not accounted for in the number of bytes returned.

By pre-allocating a byte for the terminating null character, we make
sure we'll actually read 16k bytes on each and every iteration.

Task-number: QTBUG-6019
Reviewed-by: Thiago Macieira
src/corelib/io/qiodevice.cpp
tests/auto/qiodevice/tst_qiodevice.cpp