diff options
author | chengyemao <chengyemao@noemail.net> | 2005-05-22 01:30:44 (GMT) |
---|---|---|
committer | chengyemao <chengyemao@noemail.net> | 2005-05-22 01:30:44 (GMT) |
commit | 36350b96bb0a62e3c27cefb8e8f86d24083da14a (patch) | |
tree | 4ba8e05af3e5be7bcc28edbcdf936be868069add | |
parent | 91541dfbcbea871a070ae81f8a8c1ba138757228 (diff) | |
download | tcl-36350b96bb0a62e3c27cefb8e8f86d24083da14a.zip tcl-36350b96bb0a62e3c27cefb8e8f86d24083da14a.tar.gz tcl-36350b96bb0a62e3c27cefb8e8f86d24083da14a.tar.bz2 |
Fixed a bug in expr round(x) function: returned an empty string if x was an integer
FossilOrigin-Name: 503afc89f6ef2439c7d37dad1a198c941852f56f
-rw-r--r-- | generic/tclBasic.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 3f4cda9..7637f62 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.155 2005/05/19 15:18:02 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.156 2005/05/22 01:30:44 chengyemao Exp $ */ #include "tclInt.h" @@ -5380,6 +5380,7 @@ ExprRoundFunc(clientData, interp, objc, objv) } if ((valuePtr->typePtr == &tclIntType) || (valuePtr->typePtr == &tclWideIntType)) { + Tcl_SetObjResult(interp, valuePtr); return TCL_OK; } GET_DOUBLE_VALUE(d, valuePtr, valuePtr->typePtr); |