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

Simon Richter <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
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

-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.