1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-19 21:41:33 +00:00

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

This commit is contained in:
Evil Eye 2021-04-27 14:57:07 +02:00
parent e3bb45fd61
commit abb120b439

View file

@ -61,15 +61,18 @@ namespace ESM
str += mVarNames[i].size() + 1; str += mVarNames[i].size() + 1;
if (str >= tmpEnd) if (str >= tmpEnd)
{ {
// SCVR subrecord is unused and variable names are determined if(str > tmpEnd)
// from the script source, so an overflow is not fatal. {
std::stringstream ss; // SCVR subrecord is unused and variable names are determined
ss << "String table overflow"; // from the script source, so an overflow is not fatal.
ss << "\n File: " << esm.getName(); std::stringstream ss;
ss << "\n Record: " << esm.getContext().recName.toString(); ss << "String table overflow";
ss << "\n Subrecord: " << "SCVR"; ss << "\n File: " << esm.getName();
ss << "\n Offset: 0x" << std::hex << esm.getFileOffset(); ss << "\n Record: " << esm.getContext().recName.toString();
Log(Debug::Verbose) << ss.str(); 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. // Get rid of empty strings in the list.
mVarNames.resize(i+1); mVarNames.resize(i+1);
break; break;