From 7fe8182aaad4c3615a5c4c9cd2594177f132f6d2 Mon Sep 17 00:00:00 2001 From: chengyemao Date: Sun, 22 May 2005 01:30:44 +0000 Subject: Fixed a bug in expr round(x) function: returned an empty string if x was an integer --- generic/tclBasic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- cgit v0.12