]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/io/encodings/detect/detect.factor
sequences: swap stack arguments for start/start*/subseq?.
[factor.git] / extra / io / encodings / detect / detect.factor
index ab6158b6395147e8799be1dc73bc27481846bd01..518cfa1c47d374e048ad6f1f7cc04e92def9eab6 100644 (file)
@@ -17,7 +17,7 @@ default-8bit-encoding [ latin1 ] initialize
 
 : prolog-encoding ( string -- iana-encoding )
     '[
-        _ "encoding=" over start
+        _ dup "encoding=" start
         10 + swap [ [ 1 - ] dip nth ] [ index-from ] [ swapd subseq ] 2tri
     ] [ drop "UTF-8" ] recover ;