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

Submitted by Simon Richter on Feb. 10, 2016, 8:49 p.m.

Details

Message ID 1455137348-22597-5-git-send-email-Simon.Richter@hogyros.de
State New
Series "Series without cover letter"
Headers show

Commit Message

Simon Richter Feb. 10, 2016, 8:49 p.m.
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(-)

Patch hide | download patch | download mbox

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;
 	}
     }