diff options
| author | Chong Yidong | 2009-05-04 01:18:11 +0000 |
|---|---|---|
| committer | Chong Yidong | 2009-05-04 01:18:11 +0000 |
| commit | 22d47d5e2bba29b360cd9202e1a81f49009fdc84 (patch) | |
| tree | b7dfddfd1cb050c2864be03a6dd44f2ed146690b | |
| parent | 734dabe0eceb575fcb94d1bb32152a1ab37e880f (diff) | |
| download | emacs-22d47d5e2bba29b360cd9202e1a81f49009fdc84.tar.gz emacs-22d47d5e2bba29b360cd9202e1a81f49009fdc84.zip | |
* emacs-lisp/bindat.el (bindat-pack): Allocate and set a string
directly (Bug#2878).
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/bindat.el | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 71bb2fc5694..923ef10e32c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2009-05-04 Miles Bader <miles@gnu.org> | ||
| 2 | |||
| 3 | * emacs-lisp/bindat.el (bindat-pack): Allocate and set a string | ||
| 4 | directly (Bug#2878). | ||
| 5 | |||
| 1 | 2009-05-03 Juanma Barranquero <lekktu@gmail.com> | 6 | 2009-05-03 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * term/ns-win.el (ns-alternatives-map, ns-insert-working-text) | 8 | * term/ns-win.el (ns-alternatives-map, ns-insert-working-text) |
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." | |||
| 609 | (let ((no-return bindat-raw)) | 609 | (let ((no-return bindat-raw)) |
| 610 | (unless bindat-idx (setq bindat-idx 0)) | 610 | (unless bindat-idx (setq bindat-idx 0)) |
| 611 | (unless bindat-raw | 611 | (unless bindat-raw |
| 612 | (setq bindat-raw (make-vector (+ bindat-idx (bindat-length spec struct)) 0))) | 612 | (setq bindat-raw (make-string (+ bindat-idx (bindat-length spec struct)) 0))) |
| 613 | (bindat--pack-group struct spec) | 613 | (bindat--pack-group struct spec) |
| 614 | (if no-return nil (concat bindat-raw)))) | 614 | (if no-return nil bindat-raw))) |
| 615 | 615 | ||
| 616 | 616 | ||
| 617 | ;; Misc. format conversions | 617 | ;; Misc. format conversions |