CStateManager: Fix seek again (I tested it this time)

This commit is contained in:
Luke Street 2020-04-19 21:40:08 -04:00
parent 764432882c
commit 2185dc30f1
1 changed files with 1 additions and 1 deletions

View File

@ -1379,7 +1379,7 @@ std::pair<TEditorId, TUniqueId> CStateManager::LoadScriptObject(TAreaId aid, ESc
if (error || ent == nullptr) { if (error || ent == nullptr) {
in.seek(startPos, athena::SeekOrigin::Begin); in.seek(startPos, athena::SeekOrigin::Begin);
std::string name = HashInstanceName(in); std::string name = HashInstanceName(in);
in.seek(length, athena::SeekOrigin::Current); in.seek(startPos + length, athena::SeekOrigin::Begin);
LogModule.report(logvisor::Error, FMT_STRING("Script load error while loading {}, name: {}"), LogModule.report(logvisor::Error, FMT_STRING("Script load error while loading {}, name: {}"),
ScriptObjectTypeToStr(type), name); ScriptObjectTypeToStr(type), name);
return {kInvalidEditorId, kInvalidUniqueId}; return {kInvalidEditorId, kInvalidUniqueId};