X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Freader.lisp;h=3ec10599c7f9623014002b964d73bacba4ad257a;hb=dd357f3be290498fb7ef172696d986337f517a93;hp=afb69097eccf74acd00905ec7259c63b2bad1ee6;hpb=b4831dc945c0754b3ba77881e67c8ea4d0a3d905;p=sbcl.git diff --git a/src/code/reader.lisp b/src/code/reader.lisp index afb6909..3ec1059 100644 --- a/src/code/reader.lisp +++ b/src/code/reader.lisp @@ -1431,7 +1431,7 @@ `(error 'simple-parse-error :format-control ,format-control :format-arguments (list string)))) - (with-array-data ((string string) + (with-array-data ((string string :offset-var offset) (start start) (end (%check-vector-sequence-bounds string start end))) (let ((index (do ((i start (1+ i))) @@ -1460,10 +1460,10 @@ found-digit t)) (junk-allowed (return nil)) ((whitespacep char) - (do ((jndex (1+ index) (1+ jndex))) - ((= jndex end)) - (declare (fixnum jndex)) - (unless (whitespacep (char string jndex)) + (loop + (incf index) + (when (= index end) (return)) + (unless (whitespacep (char string index)) (parse-error "junk in string ~S"))) (return nil)) (t @@ -1475,7 +1475,7 @@ (if junk-allowed nil (parse-error "no digits in string ~S"))) - index))))) + (- index offset)))))) ;;;; reader initialization code