projects
/
jscl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
347b230
)
!parse-integer: trailing whitespace also increments index, when junk
author
Alfredo Beaumont
<alfredo.beaumont@gmail.com>
Wed, 24 Apr 2013 14:40:16 +0000
(16:40 +0200)
committer
Alfredo Beaumont
<alfredo.beaumont@gmail.com>
Wed, 24 Apr 2013 14:41:45 +0000
(16:41 +0200)
is not found
ecmalisp.lisp
patch
|
blob
|
history
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)))
+ ;; 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
- (= 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)))))