summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2005-05-10 10:02:07 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2005-05-10 10:02:07 (GMT)
commit6bc86f4b98c36219302ec99939666f84264bc4da (patch)
tree277f1d0351142f29dc83f3b2eb6e3a7b4a166e74 /generic/tclExecute.c
parent33dde9da38322ebc65c821a378d4debd6a200312 (diff)
downloadtcl-6bc86f4b98c36219302ec99939666f84264bc4da.zip
tcl-6bc86f4b98c36219302ec99939666f84264bc4da.tar.gz
tcl-6bc86f4b98c36219302ec99939666f84264bc4da.tar.bz2
* generic/tclExecute.c (ExponLong, ExponWide): fixed special case
'i**0' for i>0 [Bug 1198892]
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 32c4535..ad91579 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -11,7 +11,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.186 2005/04/25 10:05:25 msofer Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.187 2005/05/10 10:02:16 msofer Exp $
*/
#include "tclInt.h"
@@ -6917,7 +6917,7 @@ ExponWide(w, w2, errExpon)
}
} else if (w == -1) {
return (w2 & 1) ? Tcl_LongAsWide(-1) : Tcl_LongAsWide(1);
- } else if (w == 1) {
+ } else if ((w == 1) || (w2 == 0)) {
return Tcl_LongAsWide(1);
} else if (w>1 && w2<0) {
return W0;
@@ -6987,7 +6987,7 @@ ExponLong(i, i2, errExpon)
}
} else if (i == -1) {
return (i2&1) ? -1L : 1L;
- } else if (i == 1) {
+ } else if ((i == 1) || (i2 == 0)) {
return 1L;
} else if (i > 1 && i2 < 0) {
return 0L;