diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2008-10-05 11:34:45 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2008-10-05 11:34:45 (GMT) |
commit | 199d4675fda94dffe00bafa804ea9f5e38f0891b (patch) | |
tree | 3902ed875b423c3eb9023c8bdd524105846cc013 /generic/tkScrollbar.c | |
parent | 8a44d010fe0fe2f1b6787480556519e67e5458f2 (diff) | |
download | tk-199d4675fda94dffe00bafa804ea9f5e38f0891b.zip tk-199d4675fda94dffe00bafa804ea9f5e38f0891b.tar.gz tk-199d4675fda94dffe00bafa804ea9f5e38f0891b.tar.bz2 |
Backport of fix for [Bug 2112563]
Diffstat (limited to 'generic/tkScrollbar.c')
-rw-r--r-- | generic/tkScrollbar.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tkScrollbar.c b/generic/tkScrollbar.c index 52e449f..ecbe729 100644 --- a/generic/tkScrollbar.c +++ b/generic/tkScrollbar.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: tkScrollbar.c,v 1.12 2007/12/13 15:24:16 dgp Exp $ + * RCS: @(#) $Id: tkScrollbar.c,v 1.12.2.1 2008/10/05 11:34:46 dkf Exp $ */ #include "tkInt.h" @@ -324,7 +324,7 @@ ScrollbarWidgetCmd( } else { fraction = ((double) pixels / (double) length); } - sprintf(buf, "%g", fraction); + Tcl_PrintDouble(NULL, fraction, buf); Tcl_SetResult(interp, buf, TCL_VOLATILE); } else if ((c == 'f') && (strncmp(argv[1], "fraction", length) == 0)) { int x, y, pos, length; @@ -359,7 +359,7 @@ ScrollbarWidgetCmd( } else if (fraction > 1.0) { fraction = 1.0; } - sprintf(buf, "%g", fraction); + Tcl_PrintDouble(NULL, fraction, buf); Tcl_SetResult(interp, buf, TCL_VOLATILE); } else if ((c == 'g') && (strncmp(argv[1], "get", length) == 0)) { if (argc != 2) { |