summaryrefslogtreecommitdiffstats
path: root/generic/tkScale.c
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/tkScale.c
parentf3920ba043d2210ee77a82e052b6861a04815dea (diff)
downloadtk-01c3b6eae077a604ee4419c21a8192125bb42844.zip
tk-01c3b6eae077a604ee4419c21a8192125bb42844.tar.gz
tk-01c3b6eae077a604ee4419c21a8192125bb42844.tar.bz2
Pushing the fix out to more files.
Diffstat (limited to 'generic/tkScale.c')
-rw-r--r--generic/tkScale.c10
1 files changed, 4 insertions, 6 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) {
/*