# HG changeset patch # User Chong Yidong # Date 1241399891 0 # Node ID 5799cf56cf250b2574a918a81a40697f589c3981 # Parent bbc4e451e5dcca4df0b3d7801fac6219a128fc9e * emacs-lisp/bindat.el (bindat-pack): Allocate and set a string directly (Bug#2878). diff -r bbc4e451e5dc -r 5799cf56cf25 lisp/ChangeLog --- a/lisp/ChangeLog Mon May 04 01:13:20 2009 +0000 +++ b/lisp/ChangeLog Mon May 04 01:18:11 2009 +0000 @@ -1,3 +1,8 @@ +2009-05-04 Miles Bader + + * emacs-lisp/bindat.el (bindat-pack): Allocate and set a string + directly (Bug#2878). + 2009-05-03 Juanma Barranquero * term/ns-win.el (ns-alternatives-map, ns-insert-working-text) diff -r bbc4e451e5dc -r 5799cf56cf25 lisp/emacs-lisp/bindat.el --- a/lisp/emacs-lisp/bindat.el Mon May 04 01:13:20 2009 +0000 +++ b/lisp/emacs-lisp/bindat.el Mon May 04 01:18:11 2009 +0000 @@ -609,9 +609,9 @@ (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