summaryrefslogtreecommitdiffstats
path: root/generic/tclBinary.c
diff options
context:
space:
mode:
authorpatthoyts@users.sourceforge.net <patthoyts>2008-03-24 02:50:48 (GMT)
committerpatthoyts@users.sourceforge.net <patthoyts>2008-03-24 02:50:48 (GMT)
commite23133b32a326c0ad2393f5fbd0f026dc3e63e4c (patch)
tree84cc9ac6b874dcc8ece70be3945ccd7823b9b8a1 /generic/tclBinary.c
parentf22c4950a6e5fbff0a133f25284d3917b84c1abb (diff)
downloadtcl-e23133b32a326c0ad2393f5fbd0f026dc3e63e4c.zip
tcl-e23133b32a326c0ad2393f5fbd0f026dc3e63e4c.tar.gz
tcl-e23133b32a326c0ad2393f5fbd0f026dc3e63e4c.tar.bz2
bug #1923966 - crash in binary format. Added tests for the above crash condition.
Diffstat (limited to 'generic/tclBinary.c')
-rw-r--r--generic/tclBinary.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index f08964d..2045d0f 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBinary.c,v 1.39 2007/12/13 15:23:15 dgp Exp $
+ * RCS: @(#) $Id: tclBinary.c,v 1.40 2008/03/24 02:50:52 patthoyts Exp $
*/
#include "tclInt.h"
@@ -785,7 +785,7 @@ Tcl_BinaryObjCmd(
if (!GetFormatSpec(&format, &cmd, &count, &flags)) {
break;
}
- if ((count == 0) && (cmd != '@')) {
+ if ((count == 0) && !(cmd == '@' || cmd == 'x')) {
arg++;
continue;
}