projects
/
jscl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
!parse-integer: trailing whitespace also increments index, when junk
[jscl.git]
/
ecmalisp.lisp
diff --git
a/ecmalisp.lisp
b/ecmalisp.lisp
index
f177605
..
cd93750
100644
(file)
--- a/
ecmalisp.lisp
+++ b/
ecmalisp.lisp
@@
-1152,11
+1152,12
@@
(unless digit (return))
(setq value (+ (* value 10) digit))
(incf index)))
(unless digit (return))
(setq value (+ (* value 10) digit))
(incf index)))
+ ;; Trailing whitespace
+ (do ((i index (1+ i)))
+ ((or (= i size) (not (whitespacep (char string i))))
+ (and (= i size) (setq index i))))
(if (or junk-allow
(if (or junk-allow
- (= index size)
- (do ((i index (1+ i)))
- ((or (>= i size) (not (whitespacep (char string i))))
- (>= i size))))
+ (= index size))
(values (* sign value) index)
(values nil index)))))
(values (* sign value) index)
(values nil index)))))