0.8alpha.0.8:
[sbcl.git] / src / code / reader.lisp
index 2372ef8..41226cb 100644 (file)
    and the lisp object built by the reader is returned. Macro chars
    will take effect."
   (declare (string string))
    and the lisp object built by the reader is returned. Macro chars
    will take effect."
   (declare (string string))
+  
   (with-array-data ((string string)
                    (start start)
   (with-array-data ((string string)
                    (start start)
-                   (end (or end (length string))))
+                   (end (%check-vector-sequence-bounds string start end)))
     (unless *read-from-string-spares*
       (push (internal-make-string-input-stream "" 0 0)
            *read-from-string-spares*))
     (unless *read-from-string-spares*
       (push (internal-make-string-input-stream "" 0 0)
            *read-from-string-spares*))
                       :format-arguments (list string))))
     (with-array-data ((string string)
                      (start start)
                       :format-arguments (list string))))
     (with-array-data ((string string)
                      (start start)
-                     (end (or end (length string))))
+                     (end (%check-vector-sequence-bounds string start end)))
       (let ((index (do ((i start (1+ i)))
                       ((= i end)
                        (if junk-allowed
       (let ((index (do ((i start (1+ i)))
                       ((= i end)
                        (if junk-allowed