Skip to content

Commit 803a7c8

Browse files
committed
Fixes crash on array_check
1 parent 11d108b commit 803a7c8

3 files changed

Lines changed: 677 additions & 1 deletion

File tree

src/arch/zx48k/translator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ def visit_ARGLIST(self, node):
188188
for i in range(len(node) - 1, -1, -1): # visit in reverse order
189189
yield node[i]
190190

191-
if isinstance(node.parent, symbols.ARRAYACCESS) and OPTIONS.arrayCheck:
191+
if isinstance(node.parent, symbols.ARRAYACCESS) and OPTIONS.arrayCheck and \
192+
node.parent.entry.scope != SCOPE.parameter:
192193
upper = node.parent.entry.bounds[i].upper
193194
lower = node.parent.entry.bounds[i].lower
194195
self.ic_param(gl.PTR_TYPE, upper - lower)

0 commit comments

Comments
 (0)