]> gitweb.factorcode.org Git - factor.git/commitdiff
apps/rss: fix bitrot and broken stack effects
authorchris.double <chris.double@double.co.nz>
Thu, 14 Dec 2006 13:35:53 +0000 (13:35 +0000)
committerchris.double <chris.double@double.co.nz>
Thu, 14 Dec 2006 13:35:53 +0000 (13:35 +0000)
apps/rss/rss.factor

index 7fdd1d2c1a2f21d1189f3c7def6a108c15744fcb..e30cd750a08fb7f12aac1b3475c3abfbc08db300 100644 (file)
@@ -36,7 +36,7 @@ USING: kernel http-client sequences namespaces math errors io ;
 : (between-tags) ( tag seq -- content )
   #! Return a string containing the contents of the XML tag contained in seq. Returns
   #! false if the tag is not found.
-  [ find-start-tag [ "no start tag" throw ] unless* ] 2keep [ find-end-tag 2dup and ] keep swap [ subseq ] when ;
+  [ find-start-tag [ "no start tag" throw ] unless* ] 2keep [ find-end-tag 2dup and ] keep swap [ subseq ] [ 3drop "" ] if ;
 
 : between-tags ( tag seq -- content )
   [ (between-tags) ] catch [ 3drop "" ] when* ;
@@ -54,7 +54,7 @@ USING: kernel http-client sequences namespaces math errors io ;
     -rot >r >r over push r> r> r> ! list tag seq end
     over length rot subseq  (child-tags) 
   ] [
-    drop drop drop drop drop 
+    drop drop drop drop 
   ] if ;
   
 : child-tags ( tag seq -- list )