diff --git a/code/stream-vector-io.lisp b/code/stream-vector-io.lisp
index 07ae3985c49c9fdb33ccd00a8607ee3492ff6ebc..3fefa609bded792a25238b2d8ec116647448f923 100644
--- a/code/stream-vector-io.lisp
+++ b/code/stream-vector-io.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (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 @@
 	   (unless (typep vector '(or string simple-numeric-vector))
 	     (error "Wrong vector type ~a for write-vector on stream ~a." (type-of vector)
 		    stream))
-	   (endian-swap-vector vector start end swap-mask)
-	   (unwind-protect
-		(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)
+	     (unwind-protect
+		  (write-sequence vector stream
+				  :start start-idx
+				  :end end-idx)
+	       (endian-swap-vector vector start-idx end-idx swap-mask)))
 	   vector))
     (* next-index octets-per-element)))