diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkMenu.c | 1 | ||||
-rw-r--r-- | generic/tkScale.c | 7 | ||||
-rw-r--r-- | generic/tkScale.h | 6 |
3 files changed, 6 insertions, 8 deletions
diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 1af9b88..516e9b0 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -1419,6 +1419,7 @@ DestroyMenuEntry( } } UnhookCascadeEntry(mePtr); + menuRefPtr = mePtr->childMenuRefPtr; if (menuRefPtr != NULL) { if (menuRefPtr->menuPtr == destroyThis) { menuRefPtr->menuPtr = NULL; diff --git a/generic/tkScale.c b/generic/tkScale.c index 7d72990..cc7c294 100644 --- a/generic/tkScale.c +++ b/generic/tkScale.c @@ -800,6 +800,9 @@ ComputeFormat( */ numDigits = scalePtr->digits; + if (numDigits > TCL_MAX_PREC) { + numDigits = 0; + } if (numDigits <= 0) { if (scalePtr->resolution > 0) { /* @@ -880,7 +883,7 @@ static void ComputeScaleGeometry( register TkScale *scalePtr) /* Information about widget. */ { - char valueString[PRINT_CHARS]; + char valueString[TCL_DOUBLE_SPACE]; int tmp, valuePixels, x, y, extraSpace; Tk_FontMetrics fm; @@ -1296,7 +1299,7 @@ ScaleSetVariable( register TkScale *scalePtr) /* Info about widget. */ { if (scalePtr->varNamePtr != NULL) { - char string[PRINT_CHARS]; + char string[TCL_DOUBLE_SPACE]; sprintf(string, scalePtr->format, scalePtr->value); scalePtr->flags |= SETTING_VAR; diff --git a/generic/tkScale.h b/generic/tkScale.h index af35978..4fd9995 100644 --- a/generic/tkScale.h +++ b/generic/tkScale.h @@ -215,12 +215,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. */ |