1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-31 13:45:35 +00:00

Merge pull request #2297 from Capostrophic/esm

Make sure the record hasn't ended in getHString hack (bug #4938)
This commit is contained in:
Bret Curtis 2019-03-31 21:15:23 +02:00 committed by GitHub
commit a5504f8cc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -49,6 +49,7 @@
Bug #4911: Editor: QOpenGLContext::swapBuffers() warning with Qt5
Bug #4916: Specular power (shininess) material parameter is ignored when shaders are used.
Bug #4922: Werewolves can not attack if the transformation happens during attack
Bug #4938: Strings from subrecords with actually empty headers can't be empty
Feature #2229: Improve pathfinding AI
Feature #3442: Default values for fallbacks from ini file
Feature #3610: Option to invert X axis

View file

@ -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)
if (mCtx.leftSub == 0 && mCtx.leftRec != 0)
{
// Skip the following zero byte
mCtx.leftRec--;