(tgachr) Fixed leak

This commit is contained in:
neauoire 2023-12-20 11:00:39 -08:00
parent e9207fae7c
commit 9a4634c02b
1 changed files with 11 additions and 11 deletions

View File

@ -113,26 +113,26 @@
JMP2r JMP2r
@<parse-tga> ( filter* length* -- ) @<parse-tga> ( filter* length* -- )
#0020 .Screen/x DEO2 #0020 DUP2 .Screen/x DEO2
#0020 .Screen/y DEO2 .Screen/y DEO2
[ LIT2 05 -Screen/auto ] DEO [ LIT2 05 -Screen/auto ] DEO
.File/length DEO2 .File/length DEO2
,&filter STR2 ,&filter STR2
#0000 ,&x STR2 #0000 ,&x STR2
#0000 ,&y STR2 #0000 ,&y STR2
&stream ( -- ) &stream ( -- )
;&pixel STH2k .File/read DEO2 ;&pixel .File/read DEO2
.File/success-lb DEI ?{ JMP2r } .File/success-lb DEI ?{ JMP2r }
[ LIT2 &x $2 ] [ LIT2 &y $2 ] #0007 AND2 STH2r [ LIT2 &filter $2 ] JSR2 <set-pixel> [ LIT2 &x $2 ] [ LIT2 &y $2 ] #0007 AND2 ;&pixel [ LIT2 &filter $2 ] JSR2 <set-pixel>
( on linebreak ) ,&x LDR2 INC2 DUP2 ,&x STR2 ( on linebreak ) ,&x LDR2 INC2 DUP2 ,&x STR2
;image/w LDA2 NEQ2 ?&stream ;image/w LDA2 NEQ2 ?&stream
#0000 ,&x STR2 #0000 ,&x STR2
,&y LDR2 INC2 ,&y STR2 ,&y LDR2 INC2 ,&y STR2
( on row ) ,&y LDR2 #0007 AND2 ORA ?&stream ( on row ) ,&y LDR2 #0007 AND2 ORA ?&stream
;buffer DUP2 .Screen/addr DEO2 ;buffer DUP2 .Screen/addr DEO2
.File2/write DEO2 .File2/write DEO2
<draw-row> <draw-row>
!&stream !&stream
&pixel $4 &pixel $4
( (