summaryrefslogtreecommitdiffstats
path: root/generic/tkScale.c
diff options
context:
space:
mode:
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) {
/*