From 7726f8f245ccfe70e11b33e74e71defb1d6b03c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Guilloux?= Date: Thu, 14 Dec 2023 22:29:44 +0100 Subject: [PATCH] Fix: [Script] Properly store the previous AsyncMode state (#11587) --- src/script/api/script_asyncmode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/script/api/script_asyncmode.cpp b/src/script/api/script_asyncmode.cpp index 6a2128febc..4e95460e72 100644 --- a/src/script/api/script_asyncmode.cpp +++ b/src/script/api/script_asyncmode.cpp @@ -39,8 +39,8 @@ ScriptAsyncMode::ScriptAsyncMode(HSQUIRRELVM vm) throw sq_throwerror(vm, "Argument must be a boolean"); } - this->last_mode = this->GetDoCommandMode(); - this->last_instance = this->GetDoCommandModeInstance(); + this->last_mode = this->GetDoCommandAsyncMode(); + this->last_instance = this->GetDoCommandAsyncModeInstance(); this->SetDoCommandAsyncMode(sqasync ? &ScriptAsyncMode::AsyncModeProc : &ScriptAsyncMode::NonAsyncModeProc, this); }