summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvPoly.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2021-11-05 21:49:57 (GMT)
committerfvogel <fvogelnew1@free.fr>2021-11-05 21:49:57 (GMT)
commitae00e1371cba162b0b47eb01e7548220f9b47fcf (patch)
treeee361e4de77a0186cb5551e92e6872c8e1538550 /generic/tkCanvPoly.c
parenteecd24c66bed6328fa05b404f7affd0c402db4ac (diff)
downloadtk-ae00e1371cba162b0b47eb01e7548220f9b47fcf.zip
tk-ae00e1371cba162b0b47eb01e7548220f9b47fcf.tar.gz
tk-ae00e1371cba162b0b47eb01e7548220f9b47fcf.tar.bz2
Better fix than previous commit, for the same issue
Diffstat (limited to 'generic/tkCanvPoly.c')
-rw-r--r--generic/tkCanvPoly.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c
index 3da4403..aeca8a7 100644
--- a/generic/tkCanvPoly.c
+++ b/generic/tkCanvPoly.c
@@ -1136,10 +1136,7 @@ PolygonInsert(
itemPtr->redraw_flags &= ~TK_ITEM_DONT_REDRAW;
} else {
- if (beforeThis < 0) {
- beforeThis += length;
- }
- beforeThis -= beforeThis % 6;
+ beforeThis -= abs(beforeThis) % 6;
objc += 4;
}