mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-27 14:37:04 +00:00
Fix an off-by-one in loadscpt
This commit is contained in:
parent
b79f26380b
commit
54adb9cbed
@ -30,7 +30,7 @@ namespace ESM
|
|||||||
// The tmp buffer is a null-byte separated string list, we
|
// The tmp buffer is a null-byte separated string list, we
|
||||||
// just have to pick out one string at a time.
|
// just have to pick out one string at a time.
|
||||||
char* str = tmp.data();
|
char* str = tmp.data();
|
||||||
if (!str)
|
if (tmp.empty())
|
||||||
{
|
{
|
||||||
if (mVarNames.size() > 0)
|
if (mVarNames.size() > 0)
|
||||||
Log(Debug::Warning) << "SCVR with no variable names";
|
Log(Debug::Warning) << "SCVR with no variable names";
|
||||||
@ -51,6 +51,7 @@ namespace ESM
|
|||||||
ss << "\n Subrecord: " << "SCVR";
|
ss << "\n Subrecord: " << "SCVR";
|
||||||
ss << "\n Offset: 0x" << std::hex << esm.getFileOffset();
|
ss << "\n Offset: 0x" << std::hex << esm.getFileOffset();
|
||||||
Log(Debug::Verbose) << ss.str();
|
Log(Debug::Verbose) << ss.str();
|
||||||
|
str = tmp.data();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < mVarNames.size(); i++)
|
for (size_t i = 0; i < mVarNames.size(); i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user