From 9a4634c02b6199095a77c822958ad8b00c967b94 Mon Sep 17 00:00:00 2001 From: neauoire Date: Wed, 20 Dec 2023 11:00:39 -0800 Subject: [PATCH] (tgachr) Fixed leak --- cli/tgachr/tgachr.tal | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/cli/tgachr/tgachr.tal b/cli/tgachr/tgachr.tal index f7d2918..4b5747f 100644 --- a/cli/tgachr/tgachr.tal +++ b/cli/tgachr/tgachr.tal @@ -113,26 +113,26 @@ JMP2r @ ( filter* length* -- ) - #0020 .Screen/x DEO2 - #0020 .Screen/y DEO2 + #0020 DUP2 .Screen/x DEO2 + .Screen/y DEO2 [ LIT2 05 -Screen/auto ] DEO .File/length DEO2 ,&filter STR2 #0000 ,&x STR2 #0000 ,&y STR2 &stream ( -- ) - ;&pixel STH2k .File/read DEO2 + ;&pixel .File/read DEO2 .File/success-lb DEI ?{ JMP2r } - [ LIT2 &x $2 ] [ LIT2 &y $2 ] #0007 AND2 STH2r [ LIT2 &filter $2 ] JSR2 + [ LIT2 &x $2 ] [ LIT2 &y $2 ] #0007 AND2 ;&pixel [ LIT2 &filter $2 ] JSR2 ( on linebreak ) ,&x LDR2 INC2 DUP2 ,&x STR2 ;image/w LDA2 NEQ2 ?&stream - #0000 ,&x STR2 - ,&y LDR2 INC2 ,&y STR2 - ( on row ) ,&y LDR2 #0007 AND2 ORA ?&stream - ;buffer DUP2 .Screen/addr DEO2 - .File2/write DEO2 - - !&stream + #0000 ,&x STR2 + ,&y LDR2 INC2 ,&y STR2 + ( on row ) ,&y LDR2 #0007 AND2 ORA ?&stream + ;buffer DUP2 .Screen/addr DEO2 + .File2/write DEO2 + + !&stream &pixel $4 (