0.8.19.24:
[sbcl.git] / src / code / fop.lisp
index a981179..89bafa3 100644 (file)
   #+sb-xc-host (bug "READ-STRING-AS-WORDS called")
   (dotimes (i length)
     (setf (aref string i)
-         (sb!xc:code-char (logior
-                            (read-byte stream)
-                            (ash (read-byte stream) 8)
-                            (ash (read-byte stream) 16)
-                            (ash (read-byte stream) 24)))))
+         (let ((code 0))
+           ;; FIXME: is this the same as READ-WORD-ARG?
+           (dotimes (k sb!vm:n-word-bytes (sb!xc:code-char code))
+             (setf code (logior code (ash (read-byte stream) 
+                                          (* k sb!vm:n-byte-bits))))))))
   (values))
 \f
 ;;;; miscellaneous fops
@@ -704,7 +704,7 @@ bug.~:@>")
   (let* ((kind (pop-stack))
         (code-object (pop-stack))
         (len (read-byte-arg))
-        (sym (make-string len)))
+        (sym (make-string len :element-type 'base-char)))
     (read-n-bytes *fasl-input-stream* sym 0 len)
     (sb!vm:fixup-code-object code-object
                             (read-word-arg)