From 7c7d314e49dc6f4d48486d5c9576e843f470ede3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Fri, 6 May 2016 21:21:23 +0200 Subject: [PATCH] images.png: length>> field isnt needed chunk length>> is always equal to chunk data>> length --- extra/images/png/png.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/images/png/png.factor b/extra/images/png/png.factor index 3f53e1fce4..89c63ab4d6 100644 --- a/extra/images/png/png.factor +++ b/extra/images/png/png.factor @@ -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 new ; inline @@ -62,7 +62,7 @@ ERROR: bad-checksum ; : read-png-chunks ( loading-png -- loading-png ) - 4 read be> [ >>length ] [ 4 + ] bi + 4 read be> 4 + read dup crc32 checksum-bytes 4 read = [ bad-checksum ] unless 4 cut-slice