From 640037b972d022fc6877b4d2e1f51f329cbec9ea Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Sun, 9 May 2021 12:32:11 -0400 Subject: Subtract another 16 from the size in clr_arr. This fixes a bug where it would zero out the info of the next malloc'd block. --- programs/sub-suite/subeditor.s | 1 + 1 file changed, 1 insertion(+) diff --git a/programs/sub-suite/subeditor.s b/programs/sub-suite/subeditor.s index 1525fa8..23a6163 100644 --- a/programs/sub-suite/subeditor.s +++ b/programs/sub-suite/subeditor.s @@ -70,6 +70,7 @@ init_tables: clr_arr: pha.q ; Preserve A. and #0 ; Reset A. + sub s, #16 ; Subtract 16 from the size. @loop: mov.q (d+s), a ; Clear 16 bytes. mov.q (d+s+8), a ; -- cgit v1.2.3-13-gbd6f