From 112b43452d302eb4ac62a20bca01bdecbfdcaaf5 Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Sat, 15 Mar 2008 00:18:59 +1030 Subject: [PATCH] Fix bug in _cairo_path_fixed_is_equal Ensure the entire path is compared. --- src/cairo-path-fixed.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cairo-path-fixed.c b/src/cairo-path-fixed.c index 55229da9f..75a76d088 100644 --- a/src/cairo-path-fixed.c +++ b/src/cairo-path-fixed.c @@ -613,8 +613,10 @@ _cairo_path_fixed_is_equal (cairo_path_fixed_t *path, if (other_buf == NULL || path_buf->num_ops != other_buf->num_ops || path_buf->num_points != other_buf->num_points || - memcmp (path_buf->op, other_buf->op, path_buf->num_ops) != 0 || - memcmp (path_buf->points, other_buf->points, path_buf->num_points != 0)) + memcmp (path_buf->op, other_buf->op, + sizeof (cairo_path_op_t) * path_buf->num_ops) != 0 || + memcmp (path_buf->points, other_buf->points, + sizeof (cairo_point_t) * path_buf->num_points) != 0) { return FALSE; }