Skip to content

Commit

Permalink
fix stupid mistake in QFile write chunking
Browse files Browse the repository at this point in the history
  • Loading branch information
coalsont committed Aug 22, 2018
1 parent 4dbfa73 commit 785f451
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Common/BinaryFile.cxx
Expand Up @@ -405,7 +405,7 @@ void QFileImpl::write(const void* dataIn, const int64_t& count)
while (total < count)
{
int64_t maxToWrite = min(count - total, CHUNK_SIZE);
writeret = m_file.write((const char*)dataIn, maxToWrite);//QFile probably also chokes on large writes
writeret = m_file.write(((const char*)dataIn) + total, maxToWrite);//QFile probably also chokes on large writes
if (writeret < 1) break;//0 or -1 means error or eof
total += writeret;
}
Expand Down

0 comments on commit 785f451

Please sign in to comment.