diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-28 23:44:33 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-28 23:44:33 (GMT) |
commit | 8b03ef0b29d52146cae3414edb12216bcc61feeb (patch) | |
tree | 39d60f75eb717fa93a1571cf2eec5cf397bf4699 /generic/tclBinary.c | |
parent | 8f6442b0c910bb7b7431c390a2dbb92985d83162 (diff) | |
parent | 71b0ad990caaf6a297049da2c63821a4e29c57ac (diff) | |
download | tcl-8b03ef0b29d52146cae3414edb12216bcc61feeb.zip tcl-8b03ef0b29d52146cae3414edb12216bcc61feeb.tar.gz tcl-8b03ef0b29d52146cae3414edb12216bcc61feeb.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic/tclBinary.c')
-rw-r--r-- | generic/tclBinary.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 28cf31d..d53fc64 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -978,11 +978,10 @@ BinaryFormatCmd( * The macro evals its args more than once: avoid arg++ */ - if (TclListObjGetElementsM(interp, objv[arg], &listc, - &listv) != TCL_OK) { + if (TclListObjLengthM(interp, objv[arg], &listc + ) != TCL_OK) { return TCL_ERROR; } - arg++; if (count == BINARY_ALL) { count = listc; @@ -992,6 +991,11 @@ BinaryFormatCmd( -1)); return TCL_ERROR; } + if (TclListObjGetElementsM(interp, objv[arg], &listc, + &listv) != TCL_OK) { + return TCL_ERROR; + } + arg++; } offset += count*size; break; |