diff options
author | dgp@users.sourceforge.net <dgp> | 2014-10-30 15:26:42 (GMT) |
---|---|---|
committer | dgp@users.sourceforge.net <dgp> | 2014-10-30 15:26:42 (GMT) |
commit | 84ef3176c3d1081b26379e7c3c4c6f402859f171 (patch) | |
tree | c02cfebbe3bcc52d1170176fc41c1f6b977ed2ac /unix/tkUnixScale.c | |
parent | fb46243282c17ff4d354a2821fe7ed9c3cac304a (diff) | |
parent | 031ee5ae6f2870c541a5f386ee540feff64bb9e6 (diff) | |
download | tk-84ef3176c3d1081b26379e7c3c4c6f402859f171.zip tk-84ef3176c3d1081b26379e7c3c4c6f402859f171.tar.gz tk-84ef3176c3d1081b26379e7c3c4c6f402859f171.tar.bz2 |
[3417012] Stop [scale] segfault when -digits too big. Thanks fvogel.
Diffstat (limited to 'unix/tkUnixScale.c')
-rw-r--r-- | unix/tkUnixScale.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/unix/tkUnixScale.c b/unix/tkUnixScale.c index cc33a27..c348037 100644 --- a/unix/tkUnixScale.c +++ b/unix/tkUnixScale.c @@ -262,7 +262,7 @@ DisplayVerticalValue( { register Tk_Window tkwin = scalePtr->tkwin; int y, width, length; - char valueString[PRINT_CHARS]; + char valueString[TCL_DOUBLE_SPACE]; Tk_FontMetrics fm; Tk_GetFontMetrics(scalePtr->tkfont, &fm); @@ -341,7 +341,7 @@ DisplayHorizontalScale( */ if (tickInterval != 0) { - char valueString[PRINT_CHARS]; + char valueString[TCL_DOUBLE_SPACE]; double ticks, maxTicks; /* @@ -478,7 +478,7 @@ DisplayHorizontalValue( { register Tk_Window tkwin = scalePtr->tkwin; int x, y, length, width; - char valueString[PRINT_CHARS]; + char valueString[TCL_DOUBLE_SPACE]; Tk_FontMetrics fm; x = TkScaleValueToPixel(scalePtr, value); @@ -535,7 +535,7 @@ TkpDisplayScale( Tcl_Interp *interp = scalePtr->interp; Pixmap pixmap; int result; - char string[PRINT_CHARS]; + char string[TCL_DOUBLE_SPACE]; XRectangle drawnArea; Tcl_DString buf; |