diff options
author | dgp <dgp@users.sourceforge.net> | 2014-10-30 15:07:28 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-10-30 15:07:28 (GMT) |
commit | 08e0eb04285780cdb42d7f3b7d6833c1adbc79ce (patch) | |
tree | 97cba1d1c56bc378ff029f5ea6dee5873ae07dbf /generic | |
parent | 245ebed1ef100bd1d20092163894e30648d3f967 (diff) | |
download | tk-08e0eb04285780cdb42d7f3b7d6833c1adbc79ce.zip tk-08e0eb04285780cdb42d7f3b7d6833c1adbc79ce.tar.gz tk-08e0eb04285780cdb42d7f3b7d6833c1adbc79ce.tar.bz2 |
Pushing the fix out to more files.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkScale.c | 10 | ||||
-rw-r--r-- | generic/tkScale.h | 6 |
2 files changed, 4 insertions, 12 deletions
diff --git a/generic/tkScale.c b/generic/tkScale.c index 258a1fa..69a7d91 100644 --- a/generic/tkScale.c +++ b/generic/tkScale.c @@ -632,12 +632,7 @@ ConfigureScale( scalePtr->tickInterval = -scalePtr->tickInterval; } - if (scalePtr->digits > TCL_MAX_PREC) { - Tcl_AppendResult(interp, "too large -digits value", NULL); - continue; - } else { - ComputeFormat(scalePtr); - } + ComputeFormat(scalePtr); scalePtr->labelLength = scalePtr->label ? (int)strlen(scalePtr->label) : 0; @@ -813,6 +808,9 @@ ComputeFormat( */ numDigits = scalePtr->digits; + if (numDigits > TCL_MAX_PREC) { + numDigits = 0; + } if (numDigits <= 0) { if (scalePtr->resolution > 0) { /* diff --git a/generic/tkScale.h b/generic/tkScale.h index f406bf6..a2c5f2b 100644 --- a/generic/tkScale.h +++ b/generic/tkScale.h @@ -220,12 +220,6 @@ typedef struct TkScale { #define SPACING 2 /* - * How many characters of space to provide when formatting the scale's value: - */ - -#define PRINT_CHARS 150 - -/* * Declaration of procedures used in the implementation of the scale widget. */ |