]> gitweb.factorcode.org Git - factor.git/commitdiff
dbf: use substitute instead of replace in parse-numeric.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 28 Feb 2018 17:56:12 +0000 (09:56 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 28 Feb 2018 17:56:12 +0000 (09:56 -0800)
extra/dbf/dbf.factor

index 240267bbacbb16b5238e1c89c29fc4a1aefc6ae8..62daadedc8f87b28692c8ed5bd69c8af4d47ba41 100644 (file)
@@ -228,7 +228,8 @@ ERROR: illegal-logical value ;
     } cond ;
 
 : parse-numeric ( byte-array -- n )
-    [ "\r\n\t *" member? ] trim "," "." replace string>number ;
+    [ "\r\n\t *" member? ] trim
+    H{ { CHAR: , CHAR: . } } substitute string>number ;
 
 : parse-double ( byte-array -- n )
     dup length 8 assert= le> bits>double ;