summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bindat.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2009-05-04 01:18:11 +0000
committerChong Yidong <cyd@stupidchicken.com>2009-05-04 01:18:11 +0000
commit22d47d5e2bba29b360cd9202e1a81f49009fdc84 (patch)
treeb7dfddfd1cb050c2864be03a6dd44f2ed146690b /lisp/emacs-lisp/bindat.el
parent734dabe0eceb575fcb94d1bb32152a1ab37e880f (diff)
downloademacs-22d47d5e2bba29b360cd9202e1a81f49009fdc84.tar.gz
emacs-22d47d5e2bba29b360cd9202e1a81f49009fdc84.tar.bz2
emacs-22d47d5e2bba29b360cd9202e1a81f49009fdc84.zip
* emacs-lisp/bindat.el (bindat-pack): Allocate and set a string
directly (Bug#2878).
Diffstat (limited to 'lisp/emacs-lisp/bindat.el')
-rw-r--r--lisp/emacs-lisp/bindat.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el
index 4843e279d14..154bffe6184 100644
--- a/lisp/emacs-lisp/bindat.el
+++ b/lisp/emacs-lisp/bindat.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