Skip to content

Commit 575d308

Browse files
committed
Fix bug in CODE freeing string when it shouldn't
1 parent f18c13f commit 575d308

3 files changed

Lines changed: 850 additions & 1 deletion

File tree

arch/zx48k/translator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,7 @@ def visit_IN(self, node):
11791179

11801180
def visit_CODE(self, node):
11811181
self.ic_fparam(gl.PTR_TYPE, node.operand.t)
1182-
if node.operand.token != 'STRING' and node.operand.token != 'VAR' and node.operand.t != '_':
1182+
if node.operand.token not in ('STRING', 'VAR', 'PARAMDECL') and node.operand.t != '_':
11831183
self.ic_fparam(TYPE.ubyte, 1) # If the argument is not a variable, it must be freed
11841184
else:
11851185
self.ic_fparam(TYPE.ubyte, 0)

0 commit comments

Comments
 (0)