summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-10-30 15:07:28 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-10-30 15:07:28 (GMT)
commit01c3b6eae077a604ee4419c21a8192125bb42844 (patch)
tree97cba1d1c56bc378ff029f5ea6dee5873ae07dbf /generic
parentf3920ba043d2210ee77a82e052b6861a04815dea (diff)
downloadtk-01c3b6eae077a604ee4419c21a8192125bb42844.zip
tk-01c3b6eae077a604ee4419c21a8192125bb42844.tar.gz
tk-01c3b6eae077a604ee4419c21a8192125bb42844.tar.bz2
Pushing the fix out to more files.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkScale.c10
-rw-r--r--generic/tkScale.h6
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.
*/