1
0
mirror of git://projects.qi-hardware.com/cae-tools.git synced 2024-12-23 04:50:49 +02:00

cameo/path.c (path_add_point): ignore duplicate points

This commit is contained in:
Werner Almesberger 2010-11-01 19:34:51 -03:00
parent b47ef755ec
commit ffc908af19

View File

@ -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;