summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 1445c4e..f235c54 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1069,12 +1069,13 @@ gen_localdec(Node *node)
return;
const int found = node_find(locals, node->lhs);
- printf("\tLIT %04x\n", const_expr(node->rhs));
+ gen_expr(node->rhs);
printf("\tLIT ,__stack_ptr LDA\n");
if (locals_size - found - 1)
printf("\tLIT %04x SUB\n",
locals_size - found - 1);
printf("\tSTA\n");
+ depth -= 1;
}
static void