summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2004-04-19 18:40:57 (GMT)
committerKevin B Kenny <kennykb@acm.org>2004-04-19 18:40:57 (GMT)
commitfcbc95ab79f792de67d4209c721c992def184483 (patch)
treecca452028b75c34fe42ab34361daaf798abf8d16 /generic
parent52abe65a5f5579fb24ba16793f367efdca4b216d (diff)
downloadtcl-fcbc95ab79f792de67d4209c721c992def184483.zip
tcl-fcbc95ab79f792de67d4209c721c992def184483.tar.gz
tcl-fcbc95ab79f792de67d4209c721c992def184483.tar.bz2
Corrected "short circuit" conversion of int to double. Reported by
Jeff Hobbs on the Tcl'ers Chat.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclObj.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 4604316..f207268 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.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: tclObj.c,v 1.57 2004/04/06 22:25:54 dgp Exp $
+ * RCS: @(#) $Id: tclObj.c,v 1.58 2004/04/19 18:40:59 kennykb Exp $
*/
#include "tclInt.h"
@@ -1593,6 +1593,7 @@ Tcl_GetDoubleFromObj(interp, objPtr, dblPtr)
return TCL_OK;
} else if ( objPtr->typePtr == &tclIntType ) {
*dblPtr = objPtr->internalRep.longValue;
+ return TCL_OK;
}
result = SetDoubleFromAny(interp, objPtr);