diff options
author | dgp <dgp@users.sourceforge.net> | 2005-10-03 18:25:19 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2005-10-03 18:25:19 (GMT) |
commit | 935e67fab513ad0a9d62ea70b8cdb49d4bbe9353 (patch) | |
tree | 4485323a86061493a34285528ed213f47191f7b4 | |
parent | c7f4e8d3f2dbad517f7815be45ce14bdefdbd97b (diff) | |
download | tcl-935e67fab513ad0a9d62ea70b8cdb49d4bbe9353.zip tcl-935e67fab513ad0a9d62ea70b8cdb49d4bbe9353.tar.gz tcl-935e67fab513ad0a9d62ea70b8cdb49d4bbe9353.tar.bz2 |
Be more choosy about what doubles get converted to longs.
-rw-r--r-- | generic/tclBasic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index a957085..bfe215a 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.136.2.36 2005/10/03 15:50:19 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.136.2.37 2005/10/03 18:25:19 dgp Exp $ */ #include "tclInt.h" @@ -5613,7 +5613,7 @@ ExprRoundFunc(clientData, interp, objc, objv) } else if (fractPart >= 0.5) { max--; } - if ((intPart > (double)max) || (intPart < (double)min)) { + if ((intPart >= (double)max) || (intPart <= (double)min)) { mp_int big; if (TclInitBignumFromDouble(interp, intPart, &big) != TCL_OK) { /* Infinity */ |