summaryrefslogtreecommitdiffstats
path: root/stdlib
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-10-18 23:21:27 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-10-18 23:21:27 -0700
commit07ae23e86e837b84c4fdfd926ad41cac736b01bc (patch)
treeff7dd7131f87be422e54d567cef35dbb6b54b186 /stdlib
parentaf23627abe262c90fe8ddbadd89e642a237e1ff8 (diff)
downloadtxr-07ae23e86e837b84c4fdfd926ad41cac736b01bc.tar.gz
txr-07ae23e86e837b84c4fdfd926ad41cac736b01bc.tar.bz2
txr-07ae23e86e837b84c4fdfd926ad41cac736b01bc.zip
pic: bug: handle ! in digit separator logic
* stdlib/pic.tl (comma-positions): Must also look for ! point if the . point is not found.
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/pic.tl2
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/pic.tl b/stdlib/pic.tl
index 70ddbedf..db9aaf80 100644
--- a/stdlib/pic.tl
+++ b/stdlib/pic.tl
@@ -54,7 +54,7 @@
(defun comma-positions (fmt)
(let* ((fmtx (regsub #/,./ #\, fmt))
(len (len fmtx))
- (ppos (or (pos #\. fmtx) len))
+ (ppos (or (pos #\. fmtx) (pos #\! fmtx) len))
(out (vec)))
(each ((i len..0))
(if (meql [fmtx i] #\,)