From: Jérémie Astor Date: Mon, 10 Aug 2020 10:40:27 +0000 (+0200) Subject: :bug: Fix typede array access X-Git-Tag: nightly~1378 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=f5a525411ee01017c4378ed9715dd0b8beb3175c;p=gwion.git :bug: Fix typede array access --- diff --git a/src/lib/array.c b/src/lib/array.c index 57f55ed6..34046336 100644 --- a/src/lib/array.c +++ b/src/lib/array.c @@ -242,7 +242,11 @@ static FREEARG(freearg_array) { static OP_CHECK(opck_not_array) { const Array_Sub array = (Array_Sub)data; - ERR_O(array->exp->pos, _("array subscripts (%"UINT_F") exceeds defined dimension (%"UINT_F")"), + if(get_depth(array->type)) { + struct Array_Sub_ next = { array->exp, array->type->e->parent, array->depth }; + return check_array_access(env, &next); + } + ERR_O(array->exp->pos, _("array subscripts (%"UINT_F") exceeds defined dimension (%"UINT_F")"), array->depth, get_depth(array->type)) }