From 26a51c3c0b243a0c5a8317f728e256109e458956 Mon Sep 17 00:00:00 2001 From: Bojidar Marinov Date: Tue, 16 May 2017 13:56:49 +0300 Subject: Reimplement for..in range() so that it always results in ints Fixes #8278, fixup of bfef8de1bc4f7a7b9617a7b181881129033a0b0e --- modules/gdscript/gd_parser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp index d64cd86de6..75029a020b 100644 --- a/modules/gdscript/gd_parser.cpp +++ b/modules/gdscript/gd_parser.cpp @@ -2626,7 +2626,7 @@ void GDParser::_parse_block(BlockNode *p_block, bool p_static) { ConstantNode *cn = alloc_node(); switch (args.size()) { - case 1: cn->value = constants[0]; break; + case 1: cn->value = (int)constants[0]; break; case 2: cn->value = Vector2(constants[0], constants[1]); break; case 3: cn->value = Vector3(constants[0], constants[1], constants[2]); break; } @@ -2639,7 +2639,7 @@ void GDParser::_parse_block(BlockNode *p_block, bool p_static) { on->arguments.push_back(tn); switch (args.size()) { - case 1: tn->vtype = Variant::REAL; break; + case 1: tn->vtype = Variant::INT; break; case 2: tn->vtype = Variant::VECTOR2; break; case 3: tn->vtype = Variant::VECTOR3; break; } -- cgit v1.2.3