From f5a525411ee01017c4378ed9715dd0b8beb3175c Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Mon, 10 Aug 2020 12:40:27 +0200 Subject: [PATCH] :bug: Fix typede array access --- src/lib/array.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)) } -- 2.43.0