summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvLine.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-01-21 03:54:41 (GMT)
committerhobbs <hobbs>2000-01-21 03:54:41 (GMT)
commit77936f61de844b8c795063558eda7de3508cdd7b (patch)
treeae734edf048def5a9ec5f3c9eca846a6753fbd01 /generic/tkCanvLine.c
parent45572469ec5bc7b41c213ee56f0a7db17bfc8cb8 (diff)
downloadtk-77936f61de844b8c795063558eda7de3508cdd7b.zip
tk-77936f61de844b8c795063558eda7de3508cdd7b.tar.gz
tk-77936f61de844b8c795063558eda7de3508cdd7b.tar.bz2
* generic/tkInt.h: moved new TkDisplay useInputMethods structure
element to end to not disturb position of previous elements in the structure (as compared to Tk <=8.2). * generic/tkCanvLine.c (LineCoords): fixed segfault when too few coords were passed to a line with certain options set (it should always have thrown an error anyway). [Bug: 4042] * tests/text.test: * generic/tkText.c: fixed missing " in error case and missing 'dump' in subcommand listing [Bug: 4036] * generic/tkListbox.c: adjusted use of basic string concatenation in (non-K&R behavior) [Bug: 4027] Swapped bg/fg class for -select(bg|fg) for listbox and their items [Bug: 4039]
Diffstat (limited to 'generic/tkCanvLine.c')
-rw-r--r--generic/tkCanvLine.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c
index 328d184..59c936e 100644
--- a/generic/tkCanvLine.c
+++ b/generic/tkCanvLine.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvLine.c,v 1.5 1999/12/14 06:52:26 hobbs Exp $
+ * RCS: @(#) $Id: tkCanvLine.c,v 1.6 2000/01/21 03:54:41 hobbs Exp $
*/
#include <stdio.h>
@@ -416,6 +416,11 @@ LineCoords(interp, canvas, itemPtr, argc, argv)
"odd number of coordinates specified for line",
(char *) NULL);
return TCL_ERROR;
+ } else if (argc < 4) {
+ Tcl_AppendResult(interp,
+ "too few coordinates specified for line",
+ (char *) NULL);
+ return TCL_ERROR;
} else {
numPoints = argc/2;
if (linePtr->numPoints != numPoints) {