From 0b231b503348dea54f56dd7b78409dfb325ea644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9stor=20Soriano?= Date: Tue, 22 Mar 2022 10:08:22 +0100 Subject: [PATCH] Fix: incorrect setting of UD_ACLU when freeing a FAT chain (#96) --- source/kernel/bank2/fat.mac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/kernel/bank2/fat.mac b/source/kernel/bank2/fat.mac index a1e1976c..2f47ff95 100644 --- a/source/kernel/bank2/fat.mac +++ b/source/kernel/bank2/fat.mac @@ -898,9 +898,11 @@ zero_dsec_loop: ld (hl),c ; the data area of buffer dec de ;DE = new value or a sbc hl,de ;HL = current value - new value, Cy=1 if new > current - call nc,ACLU_SET pop hl ;Restore address of unit descriptor - ret + ret c + ld de,(FAT_CHAIN##) + dec de + jp ACLU_SET frchlp3: push hl ;Preserve address of unit descriptor