[cairo-commit] rcairo/packages/cairo/ext rb_cairo_pattern.c, 1.10, 1.11

Oeyvind Kolaas commit at pdx.freedesktop.org
Mon Oct 10 12:30:42 PDT 2005


Committed by: pippin

Update of /cvs/cairo/rcairo/packages/cairo/ext
In directory gabe:/tmp/cvs-serv15514/packages/cairo/ext

Modified Files:
	rb_cairo_pattern.c 
Log Message:
fix varargs handling in add_color_stop

Index: rb_cairo_pattern.c
===================================================================
RCS file: /cvs/cairo/rcairo/packages/cairo/ext/rb_cairo_pattern.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- rb_cairo_pattern.c	10 Oct 2005 15:40:26 -0000	1.10
+++ rb_cairo_pattern.c	10 Oct 2005 19:30:40 -0000	1.11
@@ -179,7 +179,7 @@
       (RARRAY (red)->len == 3 || RARRAY (red)->len == 4))
     {
       VALUE ary = red;
-      n = RARRAY (ary)->len;
+      n = RARRAY (ary)->len + 1;
       
       red = rb_ary_entry (ary, 0);
       green = rb_ary_entry (ary, 1);
@@ -187,13 +187,13 @@
       alpha = rb_ary_entry (ary, 3);
     }
 
-  if (n == 3)
+  if (n == 4)
     {
       cairo_pattern_add_color_stop_rgb (_SELF (self), NUM2DBL (offset),
                                         NUM2DBL (red), NUM2DBL (green),
                                         NUM2DBL (blue));
     }
-  else if (n == 4)
+  else if (n == 5)
     {
       cairo_pattern_add_color_stop_rgba (_SELF (self), NUM2DBL (offset),
                                          NUM2DBL (red), NUM2DBL (green),



More information about the cairo-commit mailing list