fix large file being read wrong

This commit is contained in:
Akash Mozumdar 2020-03-07 03:45:07 -07:00
parent a0306fea8b
commit b9081f2472

View File

@ -40,7 +40,7 @@ private:
}
int oldSize = buffer.size();
buffer.resize(oldSize + blockSize);
if (!streambuf.sgetn((char*)buffer.data() + oldSize, blockSize * sizeof(C))) return {};
if (!streambuf.sgetn((char*)(buffer.data() + oldSize), blockSize * sizeof(C))) return {};
i = max(0, oldSize - (int)delimiter.size());
if (discard)
{