From e357ae5c628be4805717cf3f0e6fda991013f858 Mon Sep 17 00:00:00 2001 From: Barak Itkin Date: Sat, 30 Jun 2012 15:49:16 +0300 Subject: [PATCH] Critical: Fix a wrong usage of the g_list_cyclic* functions --- poly2tri-c/refine/point.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poly2tri-c/refine/point.c b/poly2tri-c/refine/point.c index 650ea7f..722cab6 100644 --- a/poly2tri-c/refine/point.c +++ b/poly2tri-c/refine/point.c @@ -107,7 +107,7 @@ void _p2tr_point_insert_edge (P2trPoint *self, P2trEdge *e) { GList *iter = self->outgoing_edges; - + /* Remember: Edges are sorted in ASCENDING angle! */ while (iter != NULL && ((P2trEdge*)iter->data)->angle < e->angle) iter = iter->next; @@ -152,7 +152,7 @@ p2tr_point_edge_ccw (P2trPoint *self, p2tr_exception_programmatic ("Could not find the CCW sibling edge" "because the edge is not present in the outgoing-edges list!"); - result = (P2trEdge*) g_list_cyclic_next (self->outgoing_edges, node); + result = (P2trEdge*) g_list_cyclic_next (self->outgoing_edges, node)->data; return p2tr_edge_ref (result); } @@ -171,7 +171,7 @@ p2tr_point_edge_cw (P2trPoint* self, p2tr_exception_programmatic ("Could not find the CW sibling edge" "because the edge is not present in the outgoing-edges list!"); - result = (P2trEdge*) g_list_cyclic_prev (self->outgoing_edges, node); + result = (P2trEdge*) g_list_cyclic_prev (self->outgoing_edges, node)->data; return p2tr_edge_ref (result); } -- 2.50.1