diff options
| author | dgp@users.sourceforge.net <dgp> | 2005-09-12 14:31:15 (GMT) |
|---|---|---|
| committer | dgp@users.sourceforge.net <dgp> | 2005-09-12 14:31:15 (GMT) |
| commit | b744ef0caac1296d5947da8fb106375866f43b87 (patch) | |
| tree | 1f92cde91eee5e0a365c457a3fcfff3dd37fc4f2 | |
| parent | 2f278a35dd4026dfa713a52f06f231702cd416a1 (diff) | |
| download | tcl-b744ef0caac1296d5947da8fb106375866f43b87.zip tcl-b744ef0caac1296d5947da8fb106375866f43b87.tar.gz tcl-b744ef0caac1296d5947da8fb106375866f43b87.tar.bz2 | |
2005-09-12 Don Porter <dgp@users.sourceforge.net>
* generic/tclStringObj.c (TclAppendFormattedObjs): Bug fix:
make sure %ld formats force the collection of a wide value, when
the value could be a different long.
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | generic/tclStringObj.c | 10 |
2 files changed, 12 insertions, 4 deletions
@@ -1,3 +1,9 @@ +2005-09-12 Don Porter <dgp@users.sourceforge.net> + + * generic/tclStringObj.c (TclAppendFormattedObjs): Bug fix: + make sure %ld formats force the collection of a wide value, when + the value could be a different long. + 2005-09-09 Andreas Kupries <andreask@activestate.com> * generic/tclIORChan.c (RcDecodeEventMask): Added missing type diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 3a042ce..dd1a2eb 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.42 2005/09/09 19:24:32 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.43 2005/09/12 14:31:15 dgp Exp $ */ #include "tclInt.h" @@ -1921,13 +1921,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) { |
