From 7f0ba864219568a590c2ab0a3a815465c16a6826 Mon Sep 17 00:00:00 2001 From: Joe Groff <arcata@gmail.com> Date: Fri, 9 Jul 2010 14:30:26 -0700 Subject: [PATCH] images.jpeg: fix loading error --- basis/images/jpeg/jpeg.factor | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/basis/images/jpeg/jpeg.factor b/basis/images/jpeg/jpeg.factor index fa6d5688bc..1050f0615d 100644 --- a/basis/images/jpeg/jpeg.factor +++ b/basis/images/jpeg/jpeg.factor @@ -120,10 +120,8 @@ TUPLE: jpeg-color-info ] with-byte-reader ; : decode-huff-table ( chunk -- ) - data>> [ binary <byte-reader> ] [ length ] bi - limit-stream <throws-on-eof> - [ - [ input-stream get [ count>> ] [ limit>> ] bi < ] + data>> [ binary <byte-reader> ] [ length ] bi limit-stream [ + [ input-stream get stream>> [ count>> ] [ limit>> ] bi < ] [ read4/4 swap 2 * + 16 read @@ -131,7 +129,7 @@ TUPLE: jpeg-color-info binary [ [ read [ B{ } ] unless* ] { } map-as ] with-byte-reader swap jpeg> huff-tables>> set-nth ] while - ] with-input-stream* ; + ] throws-on-eof ; : decode-scan ( chunk -- ) data>>