summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-06-25 19:23:24 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-06-25 19:23:24 (GMT)
commit6ed69603db59ee390437a9eb54685869393a243c (patch)
tree7898f38dfdc98c38634b26da5020bc2bba4dec5d /generic/tclCompile.c
parentedc81d994ec2f31a92dec97ec8dd28d5de990c93 (diff)
downloadtcl-6ed69603db59ee390437a9eb54685869393a243c.zip
tcl-6ed69603db59ee390437a9eb54685869393a243c.tar.gz
tcl-6ed69603db59ee390437a9eb54685869393a243c.tar.bz2
Replace always true test with assertion.
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index ccf8938..633966e 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -2098,6 +2098,7 @@ TclCompileScript(
* Emit an invoke instruction for the command. We skip this if a
* compile procedure was found for the command.
*/
+ assert(wordIdx > 0);
if (expand) {
/*
@@ -2119,7 +2120,7 @@ TclCompileScript(
TclEmitOpcode(INST_INVOKE_EXPANDED, envPtr);
envPtr->expandCount--;
TclAdjustStackDepth(1 - wordIdx, envPtr);
- } else if (wordIdx > 0) {
+ } else {
/*
* Save PC -> command map for the TclArgumentBC* functions.
*/