CMUCL commit: src/code (fd-stream.lisp)
Raymond Toy
rtoy at common-lisp.net
Wed Aug 18 18:42:06 CEST 2010
Date: Wednesday, August 18, 2010 @ 12:42:06
Author: rtoy
Path: /project/cmucl/cvsroot/src/code
Modified: fd-stream.lisp
Oops. The upper limit for the octet-count array is one less than the
string-buffer-len because the string buffer has an extra element at
the beginning (for unread-char).
----------------+
fd-stream.lisp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Index: src/code/fd-stream.lisp
diff -u src/code/fd-stream.lisp:1.117 src/code/fd-stream.lisp:1.118
--- src/code/fd-stream.lisp:1.117 Sun Aug 15 09:03:43 2010
+++ src/code/fd-stream.lisp Wed Aug 18 12:42:06 2010
@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
- "$Header: /project/cmucl/cvsroot/src/code/fd-stream.lisp,v 1.117 2010-08-15 13:03:43 rtoy Exp $")
+ "$Header: /project/cmucl/cvsroot/src/code/fd-stream.lisp,v 1.118 2010-08-18 16:42:06 rtoy Exp $")
;;;
;;; **********************************************************************
;;;
@@ -1716,9 +1716,10 @@
;; Note: string-index starts at 1 (because
;; index 0 is for the unread-char), but
;; octet-count doesn't use that. Hence,
- ;; subtract one from string-index.
+ ;; subtract one from string-index and
+ ;; string-buffer-len.
(loop for k of-type fixnum from (1- (fd-stream-string-index stream))
- below (fd-stream-string-buffer-len stream)
+ below (1- (fd-stream-string-buffer-len stream))
do (decf posn (aref ocount k)))))
(decf posn (- (fd-stream-ibuf-tail stream)
(fd-stream-ibuf-head stream))))
More information about the cmucl-commit
mailing list