From 72aa9ce7fc772e10a833709815dfeb356699e75c Mon Sep 17 00:00:00 2001 From: Thakee Nathees Date: Sun, 10 May 2020 10:07:23 +0530 Subject: [PATCH] range() with non-numeric const argument crash fix (cherry picked from commit 3e10392d4845d8f3aa3a271186812377023cc19f) --- modules/gdscript/gdscript_parser.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 5e57f79b3a2..437dc13113b 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -3156,6 +3156,8 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) { ConstantNode *c = static_cast(op->arguments[i]); if (c->value.get_type() == Variant::REAL || c->value.get_type() == Variant::INT) { constants.push_back(c->value); + } else { + constant = false; } } else { constant = false;