From 15b1abc8c3201375fc1827c7275cb63993d4efa6 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Mon, 21 Aug 2023 01:59:16 +0700 Subject: [PATCH] Fix infinite loop bug with UnflectAPI rollback --- sources/BaseAPI/API/Unflect/UnflectApi.uc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/BaseAPI/API/Unflect/UnflectApi.uc b/sources/BaseAPI/API/Unflect/UnflectApi.uc index 9b4873d..5213bd8 100644 --- a/sources/BaseAPI/API/Unflect/UnflectApi.uc +++ b/sources/BaseAPI/API/Unflect/UnflectApi.uc @@ -67,6 +67,7 @@ public final function _drop() { // Drop is called when Acedia is shutting down, so releasing references isn't necessary iter = HashTableIterator(completedReplacements.Iterate()); while (!iter.HasFinished()) { + nextFunctionInstance = none; nextFunctionName = Text(iter.GetKey()); nextSources = ByteArrayBox(originalScriptCodes.GetItem(nextFunctionName)); if (nextSources != none ) { @@ -75,6 +76,7 @@ public final function _drop() { if (nextFunctionInstance != none) { nextFunctionInstance.script = nextSources.Get(); } + iter.Next(); } }