summaryrefslogtreecommitdiffstats
path: root/modules/gdscript
diff options
context:
space:
mode:
authorMikael Hermansson <mikael@hermansson.io>2024-09-11 14:08:04 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-09-17 08:57:45 +0200
commit90f1c3e7bde1bac7372dc0f777593ea8c00bdb07 (patch)
treea2d99cdfdf17b3fd65c7a7d614118e70ed2885f1 /modules/gdscript
parentd51be1f68daa2876a82558f8186ad379f33e0b94 (diff)
downloadredot-engine-90f1c3e7bde1bac7372dc0f777593ea8c00bdb07.tar.gz
Fix issue with GDScript binary tokens being non-deterministic
(cherry picked from commit e120792760795a834e86c05b73804573d956a77b)
Diffstat (limited to 'modules/gdscript')
-rw-r--r--modules/gdscript/gdscript_tokenizer_buffer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_tokenizer_buffer.cpp b/modules/gdscript/gdscript_tokenizer_buffer.cpp
index e53bc5bc41..2046480f0e 100644
--- a/modules/gdscript/gdscript_tokenizer_buffer.cpp
+++ b/modules/gdscript/gdscript_tokenizer_buffer.cpp
@@ -296,6 +296,7 @@ Vector<uint8_t> GDScriptTokenizerBuffer::parse_code_string(const String &p_code,
encode_uint32(identifier_map.size(), &contents.write[0]);
encode_uint32(constant_map.size(), &contents.write[4]);
encode_uint32(token_lines.size(), &contents.write[8]);
+ encode_uint32(0, &contents.write[12]); // Unused, kept for compatibility. Please remove at next `TOKENIZER_VERSION` increment.
encode_uint32(token_counter, &contents.write[16]);
int buf_pos = 20;