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 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
"$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 @@
(unless (typep vector '(or string simple-numeric-vector))
(error "Wrong vector type ~a for write-vector on stream ~a." (type-of vector)
(endian-swap-vector vector start end swap-mask)
(write-sequence vector stream
:start (floor start octets-per-element)
:end (floor end octets-per-element))
(endian-swap-vector vector start end swap-mask))
(let ((start-idx (floor start octets-per-element))
(end-idx (floor end octets-per-element)))
(endian-swap-vector vector start-idx end-idx swap-mask)
(write-sequence vector stream
:start start-idx
:end end-idx)
(endian-swap-vector vector start-idx end-idx swap-mask)))
(* 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