Commit eb96f3ef authored by rtoy's avatar rtoy
Browse files

Merge change from unicode-utf16-extfmt-branch that fixes the end index

issue with WRITE-VECTOR.
parent 2bc81ca4
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/stream-vector-io.lisp,v 1.4 2009/04/10 17:21:35 rtoy Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/stream-vector-io.lisp,v 1.5 2009/04/20 20:53:47 rtoy Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -159,12 +159,14 @@ ...@@ -159,12 +159,14 @@
(unless (typep vector '(or string simple-numeric-vector)) (unless (typep vector '(or string simple-numeric-vector))
(error "Wrong vector type ~a for write-vector on stream ~a." (type-of vector) (error "Wrong vector type ~a for write-vector on stream ~a." (type-of vector)
stream)) stream))
(endian-swap-vector vector start end swap-mask) (let ((start-idx (floor start octets-per-element))
(unwind-protect (end-idx (floor end octets-per-element)))
(write-sequence vector stream (endian-swap-vector vector start-idx end-idx swap-mask)
:start (floor start octets-per-element) (unwind-protect
:end (floor end octets-per-element)) (write-sequence vector stream
(endian-swap-vector vector start end swap-mask)) :start start-idx
:end end-idx)
(endian-swap-vector vector start-idx end-idx swap-mask)))
vector)) vector))
(* next-index octets-per-element))) (* next-index octets-per-element)))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment