Mercurial > emacs
changeset 74954:29289b6efd81
(bindat--unpack-group, bindat--length-group)
(bindat--pack-group): Let-bind COUNT during repeat block evaluation.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Fri, 29 Dec 2006 01:20:48 +0000 |
parents | 2eb7f198d01d |
children | 0b7286cbaf0c |
files | lisp/emacs-lisp/bindat.el |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/emacs-lisp/bindat.el Fri Dec 29 01:20:38 2006 +0000 +++ b/lisp/emacs-lisp/bindat.el Fri Dec 29 01:20:48 2006 +0000 @@ -319,8 +319,8 @@ ((eq type 'struct) (setq data (bindat--unpack-group (eval len)))) ((eq type 'repeat) - (let ((index 0)) - (while (< index len) + (let ((index 0) (count len)) + (while (< index count) (setq data (cons (bindat--unpack-group (nthcdr tail item)) data)) (setq index (1+ index))) (setq data (nreverse data)))) @@ -415,8 +415,8 @@ (bindat--length-group (if field (bindat-get-field struct field) struct) (eval len))) ((eq type 'repeat) - (let ((index 0)) - (while (< index len) + (let ((index 0) (count len)) + (while (< index count) (bindat--length-group (nth index (bindat-get-field struct field)) (nthcdr tail item)) @@ -559,8 +559,8 @@ (bindat--pack-group (if field (bindat-get-field struct field) struct) (eval len))) ((eq type 'repeat) - (let ((index 0)) - (while (< index len) + (let ((index 0) (count len)) + (while (< index count) (bindat--pack-group (nth index (bindat-get-field struct field)) (nthcdr tail item))