diff options
author | dgp <dgp@noemail.net> | 2009-09-04 21:07:17 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2009-09-04 21:07:17 (GMT) |
commit | 6faa25aac997159c6c0e6a90a6dbeb67dac9ed5a (patch) | |
tree | 1a8215a6d786043f87510b029dec35af6a29cac2 /generic/tclCompCmds.c | |
parent | 921c483e5a1c9bf8ee15f6a0cd1feccc824762af (diff) | |
download | tcl-6faa25aac997159c6c0e6a90a6dbeb67dac9ed5a.zip tcl-6faa25aac997159c6c0e6a90a6dbeb67dac9ed5a.tar.gz tcl-6faa25aac997159c6c0e6a90a6dbeb67dac9ed5a.tar.bz2 |
Patched up flaw in option syntax checking
FossilOrigin-Name: d650611a9e9df3566394ad8ecbed7369e3ce1111
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r-- | generic/tclCompCmds.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index ffcd22a..c9b60dc 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.154 2009/09/04 17:33:11 dgp Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.155 2009/09/04 21:07:18 dgp Exp $ */ #include "tclInt.h" @@ -3877,7 +3877,7 @@ TclCompileSubstCmd( Tcl_Parse parse; Tcl_InterpState state = NULL; Tcl_Token *wordTokenPtr = TokenAfter(parsePtr->tokenPtr); - int breakOffset = 0, count = 0, code = TCL_OK; + int breakOffset = 0, count = 0, code = TCL_ERROR; Tcl_Token *endTokenPtr, *tokenPtr; DefineLineInformation; /* TIP #280 */ int bline = mapPtr->loc[eclIndex].line[numArgs]; @@ -3912,10 +3912,7 @@ TclCompileSubstCmd( * parts of the compile machinery get upset. They want all pointers * stored in Tcl_Tokens to point back to the same original string. */ - if (wordTokenPtr->type != TCL_TOKEN_SIMPLE_WORD) { - code = TCL_ERROR; - } - if (code == TCL_OK) { + if (wordTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) { code = TclSubstOptions(NULL, numOpts, objv, &flags); } |