logic error descending tree. we never need to follow the next ptr for lookups.
This commit is contained in:
parent
f5b2c0860d
commit
ccf2443ba5
23
loader.aii
23
loader.aii
|
@ -295,7 +295,7 @@ prepare_path proc
|
||||||
stz r0 ; offset into path
|
stz r0 ; offset into path
|
||||||
lda system_id
|
lda system_id
|
||||||
sta target_parent
|
sta target_parent
|
||||||
sta system_id+2
|
lda system_id+2
|
||||||
sta target_parent+2
|
sta target_parent+2
|
||||||
|
|
||||||
|
|
||||||
|
@ -665,16 +665,23 @@ eloop
|
||||||
bne eloop
|
bne eloop
|
||||||
|
|
||||||
advance
|
advance
|
||||||
lda buffer+BTNodeDescriptor.fLink
|
; wait a minute ... do we ever need to follow the next link?
|
||||||
beq @last
|
; first entry of next node is always > target.
|
||||||
xba
|
; so we can just descend via prev ptr.
|
||||||
sta bnum
|
; lda buffer+BTNodeDescriptor.fLink+2
|
||||||
bra next_index
|
; beq @last
|
||||||
|
; xba
|
||||||
|
; sta bnum
|
||||||
|
; bra next_index
|
||||||
@last ; if there was a prev node, descend into it
|
@last ; if there was a prev node, descend into it
|
||||||
|
; but not if this is a map node
|
||||||
lda prev
|
lda prev
|
||||||
bmi fnf
|
|
||||||
sta bnum
|
sta bnum
|
||||||
bra descend
|
ora buffer+BTNodeDescriptor.kind-1
|
||||||
|
bpl descend
|
||||||
|
; bmi fnf
|
||||||
|
; sta bnum
|
||||||
|
; bra descend
|
||||||
|
|
||||||
fnf
|
fnf
|
||||||
lda #fileNotFound
|
lda #fileNotFound
|
||||||
|
|
Loading…
Reference in New Issue