mirror of https://github.com/AxioDL/metaforce.git
CStateManager: Fix wrong stream position on error
This commit is contained in:
parent
d5fcb4a917
commit
764432882c
|
@ -1379,6 +1379,7 @@ std::pair<TEditorId, TUniqueId> CStateManager::LoadScriptObject(TAreaId aid, ESc
|
|||
if (error || ent == nullptr) {
|
||||
in.seek(startPos, athena::SeekOrigin::Begin);
|
||||
std::string name = HashInstanceName(in);
|
||||
in.seek(length, athena::SeekOrigin::Current);
|
||||
LogModule.report(logvisor::Error, FMT_STRING("Script load error while loading {}, name: {}"),
|
||||
ScriptObjectTypeToStr(type), name);
|
||||
return {kInvalidEditorId, kInvalidUniqueId};
|
||||
|
|
Loading…
Reference in New Issue