diff options
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r-- | generic/tclStringObj.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 11a29af..b55ffeb 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.35.2.5 2005/09/09 19:27:15 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.35.2.6 2005/09/12 14:47:16 dgp Exp $ */ #include "tclInt.h" @@ -1923,13 +1923,15 @@ TclAppendFormattedObjs(interp, baseObj, format, objc, objv) Tcl_WideInt w; int isNegative = 0; - if (Tcl_GetLongFromObj(NULL, segment, &l) != TCL_OK) { + if (useWide) { + if (Tcl_GetWideIntFromObj(interp, segment, &w) != TCL_OK) { + goto error; + } + } else if (Tcl_GetLongFromObj(NULL, segment, &l) != TCL_OK) { if (Tcl_GetWideIntFromObj(interp, segment, &w) != TCL_OK) { goto error; } l = Tcl_WideAsLong(w); - } else if (useWide) { - w = Tcl_LongAsWide(l); } if (useShort) { |