Actually fix bug 4938

pull/2393/head
Alexei Dobrohotov 6 years ago committed by GitHub
parent 01ce8b580d
commit 2c956398c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -127,7 +127,7 @@ std::string ESMReader::getHString()
// them. For some reason, they break the rules, and contain a byte
// (value 0) even if the header says there is no data. If
// Morrowind accepts it, so should we.
if (mCtx.leftSub == 0 && mCtx.leftRec != 0)
if (mCtx.leftSub == 0 && !mEsm->peek())
{
// Skip the following zero byte
mCtx.leftRec--;

Loading…
Cancel
Save