]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/base64/base64.factor
base64: Fix base64 for strings that don't end in equal signs.
[factor.git] / basis / base64 / base64.factor
index 500784ef7f89dc219d6036c744bbf9c88faba47b..717a9e0d06262eaeffb05d17f7c377792469f56a 100644 (file)
@@ -84,7 +84,7 @@ PRIVATE>
     4 "\n\r" pick read-ignoring dup length {
         { 0 [ 2drop ] }
         { 4 [ decode4 (decode-base64) ] }
-        [ malformed-base64 ]
+        [ drop 4 CHAR: = pad-tail decode4 (decode-base64) ]
     } case ;
 
 PRIVATE>