1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Merge pull request #38609 from ThakeeNathees/range-crash-with-non-numeric-const-fix

range() with non-numeric const argument crash fix
This commit is contained in:
Rémi Verschelde
2020-05-13 15:42:29 +02:00
committed by GitHub

View File

@@ -3304,6 +3304,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;