;;;; -*- coding: utf-8; fill-column: 78 -*-
changes relative to sbcl-1.0.35:
+ * bug fix: Fix SB-SIMPLE-STREAMS:READ-VECTOR to correctly set the
+ FILE-POSITION of the stream being read from. (launchpad bug lp#491087)
* bug fix: Fix grammer and style issues for the docstrings of
printer-related variables and functions. (Thanks to mon_key; launchpad
bug lp#518696)
(index (or start 0) (1+ index))
(end (or end (* (length vector) (vector-elt-width vector))))
(endian-swap (endian-swap-value vector endian-swap))
- (byte (read-byte-internal encap nil nil t)
- (read-byte-internal encap nil nil nil)))
- ((or (null byte) (>= index end)) index)
- (setf (bref vector (logxor index endian-swap)) byte))))))
+ (flag t nil))
+ ((>= index end) index)
+ (let ((byte (read-byte-internal encap nil nil flag)))
+ (unless byte
+ (return index))
+ (setf (bref vector (logxor index endian-swap)) byte)))))))
((or ansi-stream fundamental-stream)
(unless (typep vector '(or string
(simple-array (signed-byte 8) (*))
:external-format :utf-8)
(char-code (read-char s))))
196)
+
+;; launchpad bug #491087
+
+(deftest lp491087
+ (labels ((read-big-int (stream)
+ (let ((b (make-array 1 :element-type '(signed-byte 32)
+ :initial-element 0)))
+ (declare (dynamic-extent b))
+ (sb-simple-streams::read-vector b stream
+ :endian-swap :network-order)
+ (aref b 0))))
+ (with-open-file (stream "lp491087.txt" :class 'file-simple-stream)
+ (let* ((start (file-position stream))
+ (integer (read-big-int stream))
+ (end (file-position stream)))
+ (and (= start 0)
+ (= integer #x30313233)
+ (= end 4)))))
+ T)
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.35.7"
+"1.0.35.8"