]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/bindat.el
Fixes: debbugs:6594
[gnu-emacs] / lisp / emacs-lisp / bindat.el
index 4843e279d143cade19bc9541926c58cf1c626991..244b838fa29256ef81a648bc443c1764e8fdc8c8 100644 (file)
@@ -1,6 +1,6 @@
 ;;; bindat.el --- binary data structure packing and unpacking.
 
-;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
 ;; Author: Kim F. Storm <storm@cua.dk>
 ;; Assignment name: struct.el
@@ -609,9 +609,9 @@ Optional fourth arg BINDAT-IDX is the starting offset into BINDAT-RAW."
   (let ((no-return bindat-raw))
     (unless bindat-idx (setq bindat-idx 0))
     (unless bindat-raw
-      (setq bindat-raw (make-vector (+ bindat-idx (bindat-length spec struct)) 0)))
+      (setq bindat-raw (make-string (+ bindat-idx (bindat-length spec struct)) 0)))
     (bindat--pack-group struct spec)
-    (if no-return nil (concat bindat-raw))))
+    (if no-return nil bindat-raw)))
 
 
 ;; Misc. format conversions