Skip to content

Commit

Permalink
Fixed get_child with object 0
Browse files Browse the repository at this point in the history
  • Loading branch information
johanberntsson committed May 27, 2018
1 parent 27271ba commit 8e1442e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ X64 := /usr/bin/x64 -warp -autostart-delay-random
#all: czechz5
#all: strictz3
all: strictz5
#all: etude
#all: praxix

d64.czechz3:
acme -DZ3=1 $(DEBUGFLAGS) $(VMFLAGS) --cpu 6510 --format cbm -l acme_labels.txt --outfile ozmoo ozmoo.asm
Expand Down
16 changes: 15 additions & 1 deletion objecttable.asm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,21 @@ z_ins_get_child
lda #11
}
.get_sibling_child
pha
; check if object is 0
ldx z_operand_value_low_arr
bne +
ldx z_operand_value_high_arr
bne +
; object is 0, store 0 and return false
!ifdef DEBUG {
jsr print_following_string
!pet "WARNING: get_child called with object 0",13,0
}
ldx #0
lda #0
jsr z_store_result
jmp make_branch_false
+ pha
!ifdef TRACE_TREE {
ldx z_operand_value_low_arr
jsr printx
Expand Down

0 comments on commit 8e1442e

Please sign in to comment.