1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-19 14:31:59 +00:00

Fix issue with GDScript binary tokens being non-deterministic

(cherry picked from commit e120792760)
This commit is contained in:
Mikael Hermansson
2024-09-11 14:08:04 +02:00
committed by Rémi Verschelde
parent d51be1f68d
commit 90f1c3e7bd

View File

@@ -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(identifier_map.size(), &contents.write[0]);
encode_uint32(constant_map.size(), &contents.write[4]); encode_uint32(constant_map.size(), &contents.write[4]);
encode_uint32(token_lines.size(), &contents.write[8]); 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]); encode_uint32(token_counter, &contents.write[16]);
int buf_pos = 20; int buf_pos = 20;