diff --git a/Runtime/CStateManager.cpp b/Runtime/CStateManager.cpp index 8c72351c7..fb94aa5d4 100644 --- a/Runtime/CStateManager.cpp +++ b/Runtime/CStateManager.cpp @@ -1379,7 +1379,7 @@ std::pair 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); + in.seek(startPos + length, athena::SeekOrigin::Begin); LogModule.report(logvisor::Error, FMT_STRING("Script load error while loading {}, name: {}"), ScriptObjectTypeToStr(type), name); return {kInvalidEditorId, kInvalidUniqueId};