mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-07-07 12:45:53 +00:00
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) {
|
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);
|
||||||
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};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user