]> git.eshelyaron.com Git - emacs.git/commitdiff
* emacs-lisp/bindat.el (bindat-pack): Allocate and set a string
authorChong Yidong <cyd@stupidchicken.com>
Mon, 4 May 2009 01:18:11 +0000 (01:18 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Mon, 4 May 2009 01:18:11 +0000 (01:18 +0000)
directly (Bug#2878).

lisp/ChangeLog
lisp/emacs-lisp/bindat.el

index 71bb2fc569424092844e3ce5d27a8e7c1d72bfe6..923ef10e32c6fd89c154b29e9e05d4f67f132339 100644 (file)
@@ -1,3 +1,8 @@
+2009-05-04  Miles Bader  <miles@gnu.org>
+
+       * emacs-lisp/bindat.el (bindat-pack): Allocate and set a string
+       directly (Bug#2878).
+
 2009-05-03  Juanma Barranquero  <lekktu@gmail.com>
 
        * term/ns-win.el (ns-alternatives-map, ns-insert-working-text)
index 4843e279d143cade19bc9541926c58cf1c626991..154bffe6184f3dca942ae9a494884b00059d51b0 100644 (file)
@@ -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