fix a file-size corner-case

This commit is contained in:
Peter Ferrie 2021-10-20 20:27:17 -07:00
parent 7659286947
commit 9908bcb3de
2 changed files with 12 additions and 3 deletions

View File

@ -148,9 +148,9 @@ CHEATS_ENABLED = %00001000
; shared symbols for prelaunch and effects to call ProRWTS2 functions
iCurBlockLo = $D401 ; constant
iCurBlockHi = $D403 ; constant
launchpatch = $D657 ; glue.launch.a
launchpatch = $D661 ; glue.launch.a
iAddToPath = $FE5C ; Roger Rabbit, avoid, use Infiltrator 2 style instead
itraverse = $D94E ; Roger Rabbit, avoid, use Infiltrator 2 style instead
itraverse = $D958 ; Roger Rabbit, avoid, use Infiltrator 2 style instead
ldrlo = $55 ; constant
ldrhi = $56 ; constant
namlo = $57 ; constant

View File

@ -230,6 +230,7 @@ ver_02 = 1
KEY_POINTER = $11 ;ProDOS constant
EOF_LO = $15 ;ProDOS constant
EOF_HI = $16 ;ProDOS constant
EOF_HI2 = $17 ;ProDOS constant
AUX_TYPE = $1f ;ProDOS constant
ENTRY_SIZE = $27 ;ProDOS constant
NEXT_BLOCK_LO = $2 ;ProDOS constant
@ -2687,7 +2688,15 @@ pathpatch2
!if (bounds_check + return_size + one_shot) > 0 {
;cache EOF (file size, loaded backwards)
ldy #EOF_HI
ldy #EOF_HI2
lda (scratchlo), y
beq not48
lda #$ff
tax
bne +
not48
dey
lda (scratchlo), y
!if (enable_write + aligned_read) > 0 {
tax