[cairo] [PATCH] tristrip: Correctly resize points array
Martin Robinson
mrobinson at igalia.com
Fri Oct 14 16:41:22 PDT 2011
cairo_tristrip_t grows its array of points using realloc.
Use the size of cairo_point_t instead of cairo_trapezoid_t
to size the new array.
---
src/cairo-tristrip.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/cairo-tristrip.c b/src/cairo-tristrip.c
index bb4972f..da08267 100644
--- a/src/cairo-tristrip.c
+++ b/src/cairo-tristrip.c
@@ -98,7 +98,7 @@ _cairo_tristrip_grow (cairo_tristrip_t *strip)
memcpy (points, strip->points, sizeof (strip->points_embedded));
} else {
points = _cairo_realloc_ab (strip->points,
- new_size, sizeof (cairo_trapezoid_t));
+ new_size, sizeof (cairo_point_t));
}
if (unlikely (points == NULL)) {
--
1.7.4.1
More information about the cairo
mailing list