[cairo] [PATCH 4/4] script surface: fix off by one error

Simon Richter Simon.Richter at hogyros.de
Wed Feb 10 21:49:08 CET 2016


If the value 256 is ever reached, this is interpreted the same as 0 in
later code, so this is likely to be broken.
---
 src/cairo-script-surface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cairo-script-surface.c b/src/cairo-script-surface.c
index d5f890e..d314f7a 100644
--- a/src/cairo-script-surface.c
+++ b/src/cairo-script-surface.c
@@ -3373,7 +3373,7 @@ _cairo_script_surface_show_text_glyphs (void			    *abstract_surface,
 		goto BAIL;
 	    }
 
-	    if ((intptr_t) scaled_glyph->dev_private > 256)
+	    if ((intptr_t) scaled_glyph->dev_private >= 256)
 		break;
 	}
     }
-- 
2.1.4



More information about the cairo mailing list