images.png: length>> field isnt needed

chunk length>> is always equal to chunk data>> length
locals-and-roots
Björn Lindqvist 2016-05-06 21:21:23 +02:00
parent 3edf8f594a
commit 7c7d314e49
1 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ CONSTANT: block-width { 8 4 4 2 2 1 1 }
loading-png new
V{ } clone >>chunks ;
TUPLE: png-chunk length type data ;
TUPLE: png-chunk type data ;
: <png-chunk> ( -- png-chunk )
png-chunk new ; inline
@ -62,7 +62,7 @@ ERROR: bad-checksum ;
: read-png-chunks ( loading-png -- loading-png )
<png-chunk>
4 read be> [ >>length ] [ 4 + ] bi
4 read be> 4 +
read dup crc32 checksum-bytes
4 read = [ bad-checksum ] unless
4 cut-slice