From 9363ecc1086b1183295628cb874362a088451d60 Mon Sep 17 00:00:00 2001
From: Tim Wawrzynczak <inforichland@gmail.com>
Date: Sun, 15 Feb 2009 19:12:46 -0600
Subject: [PATCH] Removed extra nulls from v1 tags

---
 extra/id3/id3-tests.factor |  8 ++++----
 extra/id3/id3.factor       | 10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/extra/id3/id3-tests.factor b/extra/id3/id3-tests.factor
index b9d45b1b04..fdbaf69f03 100644
--- a/extra/id3/id3-tests.factor
+++ b/extra/id3/id3-tests.factor
@@ -164,17 +164,17 @@ IN: id3.tests
 [    
   T{ mp3v1-file
      { title
-       "BLAH\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+       "BLAH"
      }
      { artist
-       "ARTIST\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+       "ARTIST"
      }
      { album
-       "ALBUM\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+       "ALBUM"
      }
      { year "2009" }
      { comment
-       "COMMENT\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+       "COMMENT"
      }
      { genre 89 }
   }
diff --git a/extra/id3/id3.factor b/extra/id3/id3.factor
index 64e1ff1d10..5b0d3f373e 100644
--- a/extra/id3/id3.factor
+++ b/extra/id3/id3.factor
@@ -127,11 +127,11 @@ TUPLE: mp3v1-file title artist album year comment genre ;
 : (read-v1-tag-data) ( seq -- mp3-file )
     [ <mp3v1-file> ] dip
     {
-        [ read-title   ascii decode  >>title ]
-        [ read-artist  ascii decode  >>artist ]
-        [ read-album   ascii decode  >>album ]
-        [ read-year    ascii decode  >>year ]
-        [ read-comment ascii decode  >>comment ]
+        [ read-title   ascii decode  filter-text-data >>title ]
+        [ read-artist  ascii decode  filter-text-data >>artist ]
+        [ read-album   ascii decode  filter-text-data >>album ]
+        [ read-year    ascii decode  filter-text-data >>year ]
+        [ read-comment ascii decode  filter-text-data >>comment ]
         [ read-genre   >fixnum       >>genre ]
     } cleave ;