diff options
author | Richard Hansen <rhansen@rhansen.org> | 2022-05-28 23:53:51 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-06-01 22:20:49 -0400 |
commit | 30ec4a7347b2944818c6fc469ae871374ce7caa4 (patch) | |
tree | c1f5cd55bf6c1b6512296eefe18ab5f193afd8c5 /lisp/emacs-lisp/bindat.el | |
parent | e66d6b379345063900eb3e99db6367c69a860cdf (diff) | |
download | emacs-30ec4a7347b2944818c6fc469ae871374ce7caa4.tar.gz emacs-30ec4a7347b2944818c6fc469ae871374ce7caa4.tar.bz2 emacs-30ec4a7347b2944818c6fc469ae871374ce7caa4.zip |
; bindat (strz): Consistent length type check
The strz length computation uses `numberp' to switch between
fixed-length and variable-length modes, so packing should too.
Diffstat (limited to 'lisp/emacs-lisp/bindat.el')
-rw-r--r-- | lisp/emacs-lisp/bindat.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el index b236e47e5b9..e597dd62479 100644 --- a/lisp/emacs-lisp/bindat.el +++ b/lisp/emacs-lisp/bindat.el @@ -693,7 +693,7 @@ is the name of a variable that will hold the value we need to pack.") (t `(or ,len (1+ (length ,val))))))) (`(pack . ,args) (macroexp-let2 nil len len - `(if ,len + `(if (numberp ,len) ;; Same as non-zero terminated strings since we don't actually add ;; the terminating zero anyway (because we rely on the fact that ;; `bindat-raw' was presumably initialized with all-zeroes before |