From 982a0ac3487615ab012e4cfcd5fb5b160ca92175 Mon Sep 17 00:00:00 2001 From: Johannes Date: Sat, 6 Mar 2021 01:53:32 +0100 Subject: [PATCH] Fix GDScript Tokenizer being very strict about the number of underscores You can use multiple underscores in one number, just not two of them together. --- modules/gdscript/gdscript_tokenizer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/gdscript/gdscript_tokenizer.cpp b/modules/gdscript/gdscript_tokenizer.cpp index 315b8ee3b49..5888704c908 100644 --- a/modules/gdscript/gdscript_tokenizer.cpp +++ b/modules/gdscript/gdscript_tokenizer.cpp @@ -633,6 +633,8 @@ GDScriptTokenizer::Token GDScriptTokenizer::number() { push_error(error); } previous_was_underscore = true; + } else { + previous_was_underscore = false; } _advance(); } @@ -704,6 +706,8 @@ GDScriptTokenizer::Token GDScriptTokenizer::number() { push_error(error); } previous_was_underscore = true; + } else { + previous_was_underscore = false; } _advance(); }