From 2c956398c16e93c14376870f2c064e9bacb56d3a Mon Sep 17 00:00:00 2001 From: Alexei Dobrohotov <21265616+Capostrophic@users.noreply.github.com> Date: Wed, 15 May 2019 21:41:49 +0300 Subject: [PATCH] Actually fix bug 4938 --- components/esm/esmreader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esm/esmreader.cpp b/components/esm/esmreader.cpp index 278a1541a4..92dbba1674 100644 --- a/components/esm/esmreader.cpp +++ b/components/esm/esmreader.cpp @@ -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--;