Skip to content

Commit

Permalink
range() with non-numeric const argument crash fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ThakeeNathees committed May 10, 2020
1 parent ff5dfcd commit 3e10392
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/gdscript/gdscript_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3e10392

Please sign in to comment.