Skip to content

Commit 785f451

Browse files
committed
fix stupid mistake in QFile write chunking
1 parent 4dbfa73 commit 785f451

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Common/BinaryFile.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ void QFileImpl::write(const void* dataIn, const int64_t& count)
405405
while (total < count)
406406
{
407407
int64_t maxToWrite = min(count - total, CHUNK_SIZE);
408-
writeret = m_file.write((const char*)dataIn, maxToWrite);//QFile probably also chokes on large writes
408+
writeret = m_file.write(((const char*)dataIn) + total, maxToWrite);//QFile probably also chokes on large writes
409409
if (writeret < 1) break;//0 or -1 means error or eof
410410
total += writeret;
411411
}

0 commit comments

Comments
 (0)