From e986a604876d66d27f08c04aa893b4b4372686cf Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Thu, 26 Feb 2009 17:54:44 -0600 Subject: [PATCH] id3 shouldn't fail on files with length < 128 --- extra/id3/id3.factor | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/extra/id3/id3.factor b/extra/id3/id3.factor index f2bbd08996..289cc27b6b 100644 --- a/extra/id3/id3.factor +++ b/extra/id3/id3.factor @@ -1,6 +1,10 @@ ! Copyright (C) 2009 Tim Wawrzynczak ! See http://factorcode.org/license.txt for BSD license. -USING: sequences io io.encodings.binary io.files io.pathnames strings kernel math io.mmap io.mmap.uchar accessors syntax combinators math.ranges unicode.categories byte-arrays io.encodings.string io.encodings.utf8 assocs math.parser ; +USING: sequences io io.encodings.binary io.files io.pathnames +strings kernel math io.mmap io.mmap.uchar accessors syntax +combinators math.ranges unicode.categories byte-arrays +io.encodings.string io.encodings.utf8 assocs math.parser +combinators.short-circuit ; IN: id3 = ] [ 128 tail-slice* "TAG" head? ] } 1&& ; : >28bitword ( seq -- int ) 0 [ swap 7 shift bitor ] reduce ;