From 6f597037aa245a0cb964a1e2276f90c1f8c54197 Mon Sep 17 00:00:00 2001 From: johanengelen Date: Thu, 8 Mar 2007 15:13:01 +0000 Subject: [PATCH] Fixed bug due to adding of new pointtype at the start of the enum which corrupted indexing into the stop shapes and description array. --- src/sp-gradient.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/sp-gradient.h b/src/sp-gradient.h index 8576d0a82..52234b50e 100644 --- a/src/sp-gradient.h +++ b/src/sp-gradient.h @@ -39,8 +39,7 @@ typedef enum { } SPGradientState; typedef enum { - POINT_G_INVALID, - POINT_LG_BEGIN, + POINT_LG_BEGIN =0, //start enum at 0 (for indexing into gr_knot_shapes array for example) POINT_LG_END, POINT_LG_MID, POINT_RG_CENTER, @@ -48,7 +47,10 @@ typedef enum { POINT_RG_R2, POINT_RG_FOCUS, POINT_RG_MID1, - POINT_RG_MID2 + POINT_RG_MID2, + // insert new point types here. + + POINT_G_INVALID } GrPointType; /** -- 2.30.2