initialize max_param_count to 1 so vararg functions don't try to create an accessor for an array of 0 elements...

This commit is contained in:
Wolfgang Bumiller 2013-01-16 09:37:32 +01:00
parent dfad837f5b
commit 0ba8455f6a

View file

@ -5708,6 +5708,8 @@ bool parser_init()
if (OPTS_FLAG(UNTYPED_NIL))
util_htset(parser->htglobals, "nil", (void*)parser->nil);
parser->max_param_count = 1;
parser->const_vec[0] = ast_value_new(empty_ctx, "<vector.x>", TYPE_NOEXPR);
parser->const_vec[1] = ast_value_new(empty_ctx, "<vector.y>", TYPE_NOEXPR);
parser->const_vec[2] = ast_value_new(empty_ctx, "<vector.z>", TYPE_NOEXPR);