From 2185dc30f1b4a41e2badf63c02a01905de984ff1 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sun, 19 Apr 2020 21:40:08 -0400 Subject: [PATCH] CStateManager: Fix seek again (I tested it this time) --- Runtime/CStateManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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};