Skip to content

Commit 3aaa248

Browse files
authored
Merge pull request #836 from boriel-basic/fix/crash_on_sub_with_data_and_O1
Fix/crash on sub with data and o1
2 parents 0bfaad3 + 4310dbc commit 3aaa248

6 files changed

Lines changed: 468 additions & 4 deletions

File tree

src/arch/z80/visitor/function_translator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def visit_FUNCTION(self, node):
117117
for local_var in node.local_symbol_table.values():
118118
scope = local_var.scope
119119
if local_var.type_ == self.TYPE(TYPE.string):
120-
if local_var.class_ == CLASS.const:
120+
if local_var.class_ == CLASS.const or local_var.token == "FUNCTION":
121121
continue
122122
# Only if it's string we free it
123123
if local_var.class_ != CLASS.array: # Ok just free it

0 commit comments

Comments
 (0)