From fcbc95ab79f792de67d4209c721c992def184483 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Mon, 19 Apr 2004 18:40:57 +0000 Subject: Corrected "short circuit" conversion of int to double. Reported by Jeff Hobbs on the Tcl'ers Chat. --- ChangeLog | 6 ++++++ generic/tclObj.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 00337df..de9dc31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-04-19 Kevin B. Kenny + + * generic/tclObj.c (Tcl_GetDoubleFromObj) Corrected + "short circuit" conversion of int to double. Reported by + Jeff Hobbs on the Tcl'ers Chat. + 2004-04-16 Donal K. Fellows * doc/lreplace.n, doc/lrange.n, doc/llength.n: More examples for 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); -- cgit v0.12