Fixed ByRef UDT arrays

This commit is contained in:
n00b
2024-12-21 02:28:44 -05:00
parent 33919725bf
commit 9c5aaa8db6
2 changed files with 5 additions and 3 deletions

View File

@@ -1415,8 +1415,10 @@ bool pre_parse(int start_token = 0, int end_token = -1, int pp_flags, bool eval_
return false;
}
bool byref_isArray = (id[tmp_id].type == ID_TYPE_BYREF_USER && arg_count == 1);
if(arg_count != id[tmp_id].num_args)
if(arg_count != id[tmp_id].num_args && (!byref_isArray))
{
if(type_redim_flag)
{
@@ -1680,7 +1682,7 @@ bool pre_parse(int start_token = 0, int end_token = -1, int pp_flags, bool eval_
if(byref_type_flag)
{
type_error_exception tx;
tx.error_log = "[0]Expected " + rc_intToString(id[tmp_id].num_args) + " dimension in " + id[tmp_id].name;
tx.error_log = "[0.1]Expected " + rc_intToString(id[tmp_id].num_args) + " dimension in " + id[tmp_id].name;
tx.tk_reg = token[i];
tx.num_args = id[tmp_id].num_args;
tx.exception_used = false;