summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoïc Guilloux <glx22@users.noreply.github.com>2021-10-20 12:23:16 +0200
committerGitHub <noreply@github.com>2021-10-20 12:23:16 +0200
commiteed49d779274ec149c5a69805ab6e6d21d149f89 (patch)
treeb49672a546d8facd2a45ae301ddd5efa8bd2fc48
parente68a51ecede7add7057dd5cfa37c1f2c0cb2e448 (diff)
downloadopenttd-eed49d779274ec149c5a69805ab6e6d21d149f89.tar.xz
Fix #9626, ddafc0d: Incorrect loading of script saved data (#9629)
-rw-r--r--src/script/script_instance.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/script_instance.cpp b/src/script/script_instance.cpp
index 3f611e66c..4342289af 100644
--- a/src/script/script_instance.cpp
+++ b/src/script/script_instance.cpp
@@ -565,7 +565,7 @@ bool ScriptInstance::IsPaused()
switch (_script_sl_byte) {
case SQSL_INT: {
int64 value;
- SlCopy(&value, 1, IsSavegameVersionBefore(SLV_SCRIPT_INT64) ? SLE_INT32 : SLE_INT64);
+ SlCopy(&value, 1, IsSavegameVersionBefore(SLV_SCRIPT_INT64) ? SLE_FILE_I32 | SLE_VAR_I64 : SLE_INT64);
if (vm != nullptr) sq_pushinteger(vm, (SQInteger)value);
return true;
}