summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-09-11 04:54:11 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-09-11 04:54:11 (GMT)
commitf022566c6702274fee39625a33c67b3fbe9e0bdd (patch)
treeefceb31bc39c6f1a4ba37995f5beff4aff0f515f /generic
parent79f6a0d9d0e4ea44300ce7ae1c824649615833fc (diff)
downloadtcl-f022566c6702274fee39625a33c67b3fbe9e0bdd.zip
tcl-f022566c6702274fee39625a33c67b3fbe9e0bdd.tar.gz
tcl-f022566c6702274fee39625a33c67b3fbe9e0bdd.tar.bz2
* generic/tclExecute.c: Corrected INST_EXPON flaw that treated
* tests/expr.test: $x**1 as $x**3. [Bug 1555371]
Diffstat (limited to 'generic')
-rw-r--r--generic/tclExecute.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 3a7d82f..d664134 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.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: tclExecute.c,v 1.243 2006/08/29 06:28:38 das Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.244 2006/09/11 04:54:11 dgp Exp $
*/
#include "tclInt.h"
@@ -4856,6 +4856,9 @@ TclExecuteByteCode(
}
w1 *= w1;
w2 /= 2;
+ if (w2 == 0) {
+ break;
+ }
for (; w2>Tcl_LongAsWide(1) ; w1*=w1,w2/=2) {
wasNegative = (wResult < 0);
if (w1 <= 0) {