summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThakee Nathees <thakeenathees@gmail.com>2020-05-10 10:07:23 +0530
committerThakee Nathees <thakeenathees@gmail.com>2020-05-10 10:07:23 +0530
commit3e10392d4845d8f3aa3a271186812377023cc19f (patch)
tree2f7dbf572863b5e1f465c4e9e8aa768be2c85002
parentff5dfcdf68c20590bf123ade75ca06ed58276372 (diff)
range() with non-numeric const argument crash fix
-rw-r--r--modules/gdscript/gdscript_parser.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index c875846fcc..811e54aad2 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -3160,6 +3160,8 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) {
ConstantNode *c = static_cast<ConstantNode *>(op->arguments[i]);
if (c->value.get_type() == Variant::FLOAT || c->value.get_type() == Variant::INT) {
constants.push_back(c->value);
+ } else {
+ constant = false;
}
} else {
constant = false;