Merge branch 'overflow_spam' into 'master'

Don't log a warning for reading to the end of the subrecord

See merge request OpenMW/openmw!786
pull/593/head
elsid 4 years ago
commit 91e94b221a

@ -60,6 +60,8 @@ namespace ESM
mVarNames[i] = std::string(str);
str += mVarNames[i].size() + 1;
if (str >= tmpEnd)
{
if(str > tmpEnd)
{
// SCVR subrecord is unused and variable names are determined
// from the script source, so an overflow is not fatal.
@ -70,6 +72,7 @@ namespace ESM
ss << "\n Subrecord: " << "SCVR";
ss << "\n Offset: 0x" << std::hex << esm.getFileOffset();
Log(Debug::Verbose) << ss.str();
}
// Get rid of empty strings in the list.
mVarNames.resize(i+1);
break;

Loading…
Cancel
Save