summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authormdejong <mdejong@noemail.net>2005-10-28 03:26:32 (GMT)
committermdejong <mdejong@noemail.net>2005-10-28 03:26:32 (GMT)
commit12b16079c7baa6d7ccacbbfe901bf638b9ab14db (patch)
tree931092530cdc8242d3889e664bb9019453dce015 /generic
parent948624ebed428bc0d1f86d477d4d284f12252a35 (diff)
downloadtcl-12b16079c7baa6d7ccacbbfe901bf638b9ab14db.zip
tcl-12b16079c7baa6d7ccacbbfe901bf638b9ab14db.tar.gz
tcl-12b16079c7baa6d7ccacbbfe901bf638b9ab14db.tar.bz2
* generic/tclExecute.c (ExprRoundFunc):
Fix typo where number before rounding is compared with smallest integer instead of number after rounding. This fix does not change the results of any tests. * tests/expr.test: Add round() tests for cases near the min and max int values. * tests/util.test: Remove pointless warning code about testobj command. FossilOrigin-Name: fb8cf7da366a326764acc225c760bab02a5ad506
Diffstat (limited to 'generic')
-rw-r--r--generic/tclExecute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 20f34e6..c238a98 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.94.2.16 2005/10/23 22:01:29 msofer Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.94.2.17 2005/10/28 03:26:32 mdejong Exp $
*/
#include "tclInt.h"
@@ -5501,7 +5501,7 @@ ExprRoundFunc(interp, eePtr, clientData)
}
if (i <= Tcl_WideAsDouble(LLONG_MIN)) {
goto tooLarge;
- } else if (d <= (double) LONG_MIN) {
+ } else if (i <= (double) LONG_MIN) {
resPtr = Tcl_NewWideIntObj(Tcl_DoubleAsWide(i));
} else {
resPtr = Tcl_NewLongObj((long) i);