Skip to content

Commit 76c45d7

Browse files
committed
Fix bug in VAL freeing string when it shouldn't
1 parent 575d308 commit 76c45d7

3 files changed

Lines changed: 991 additions & 1 deletion

File tree

arch/zx48k/translator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ def visit_LEN(self, node):
12021202

12031203
def visit_VAL(self, node):
12041204
self.ic_fparam(gl.PTR_TYPE, node.operand.t)
1205-
if node.operand.token not in ('STRING', 'VAR') and node.operand.t != '_':
1205+
if node.operand.token not in ('STRING', 'VAR', 'PARAMDECL') and node.operand.t != '_':
12061206
self.ic_fparam(TYPE.ubyte, 1) # If the argument is not a variable, it must be freed
12071207
else:
12081208
self.ic_fparam(TYPE.ubyte, 0)

0 commit comments

Comments
 (0)