From b587946d61fca095d89334a5a128ae4f380ca435 Mon Sep 17 00:00:00 2001 From: fvogel Date: Thu, 27 Jun 2024 06:04:28 +0000 Subject: Add test canvas-11.4 demonstrating bug [51ece3786f]. --- tests/canvas.test | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/canvas.test b/tests/canvas.test index 1224516..e8a3951 100644 --- a/tests/canvas.test +++ b/tests/canvas.test @@ -530,6 +530,13 @@ test canvas-11.3 {canvas poly dchars, bug 3291543} { .c dchars 1 2 end .c coords 1 } {} +test canvas-11.4 {canvas line dchars crash with -arrows, bug 51ece3786f} { + # This would crash + destroy .c + canvas .c + .c create line 10 10 100 100 -arrow last + .c dchars 1 0 1 +} {} test canvas-12.1 {canvas mm obj, patch SF-403327, 102471} -setup { destroy .c -- cgit v0.12 From 72d3efa9db1388bc4db29755b1d1befe33b457a0 Mon Sep 17 00:00:00 2001 From: fvogel Date: Thu, 27 Jun 2024 06:05:14 +0000 Subject: Fix [51ece3786f]: crash with dchars on line with arrows. --- generic/tkCanvLine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c index a001677..408ef7c 100644 --- a/generic/tkCanvLine.c +++ b/generic/tkCanvLine.c @@ -700,10 +700,10 @@ ComputeLineBbox( width = 1.0; } if (linePtr->arrow != ARROWS_NONE) { - if (linePtr->arrow != ARROWS_LAST) { + if (linePtr->arrow != ARROWS_LAST && linePtr->firstArrowPtr) { TkIncludePoint((Tk_Item *) linePtr, linePtr->firstArrowPtr); } - if (linePtr->arrow != ARROWS_FIRST) { + if (linePtr->arrow != ARROWS_FIRST && linePtr->lastArrowPtr) { TkIncludePoint((Tk_Item *) linePtr, linePtr->lastArrowPtr); } } -- cgit v0.12 From 405cd1740e12c6b84187670afbaf7f835310c288 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 12 Jul 2024 06:43:18 +0000 Subject: Fix Tk_ObjCustomOption documentation --- doc/SetOptions.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/SetOptions.3 b/doc/SetOptions.3 index c989821..2eb3b88 100644 --- a/doc/SetOptions.3 +++ b/doc/SetOptions.3 @@ -521,7 +521,7 @@ free, and restore saved copies of the type and creating a structure pointing to those procedures: .CS typedef struct Tk_ObjCustomOption { - char *name; + const char *\fname\fR; Tk_CustomOptionSetProc *\fIsetProc\fR; Tk_CustomOptionGetProc *\fIgetProc\fR; Tk_CustomOptionRestoreProc *\fIrestoreProc\fR; -- cgit v0.12