From ffc908af19ac9327e9cebade271ee0413375f2a7 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Mon, 1 Nov 2010 19:34:51 -0300 Subject: [PATCH] cameo/path.c (path_add_point): ignore duplicate points --- cameo/path.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cameo/path.c b/cameo/path.c index be3b37e..17789a0 100644 --- a/cameo/path.c +++ b/cameo/path.c @@ -88,6 +88,12 @@ static int path_is_closed(const struct path *path) static void path_add_point(struct path *path, struct point *p) { + if (path->last && + path->last->x == p->x && path->last->y == p->y && + path->last->z == p->z) { + free(p); + return; + } p->next = NULL; if (path->last) path->last->next = p;