From: Alfredo Beaumont Date: Tue, 23 Apr 2013 14:16:48 +0000 (+0200) Subject: !parse-integer: fix junk processing X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=347b230656b0496c9c0259e2d29f12a9f7db81bb;p=jscl.git !parse-integer: fix junk processing --- diff --git a/ecmalisp.lisp b/ecmalisp.lisp index 21ef044..f177605 100644 --- a/ecmalisp.lisp +++ b/ecmalisp.lisp @@ -1154,7 +1154,9 @@ (incf index))) (if (or junk-allow (= index size) - (char= (char string index) #\space)) + (do ((i index (1+ i))) + ((or (>= i size) (not (whitespacep (char string i)))) + (>= i size)))) (values (* sign value) index) (values nil index)))))