diff options
author | Havoc Pennington <hp@pobox.com> | 2001-10-05 02:56:10 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2001-10-05 02:56:10 +0000 |
commit | 53f471854b71daa60be64aea6fa6ad117c54032b (patch) | |
tree | a9b3d096f356ac67aaed67f3ceff6784acd4b58a /pango/break.c | |
parent | 1dabbdffe09da6b13bb764e752de39ccac9b8679 (diff) | |
download | pango-53f471854b71daa60be64aea6fa6ad117c54032b.tar.gz |
fix wrong check for incorrect attrs_len
2001-10-04 Havoc Pennington <hp@pobox.com>
* pango/break.c (pango_default_break): fix wrong
check for incorrect attrs_len
Diffstat (limited to 'pango/break.c')
-rw-r--r-- | pango/break.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pango/break.c b/pango/break.c index caebff5a..a4377fb4 100644 --- a/pango/break.c +++ b/pango/break.c @@ -442,7 +442,8 @@ pango_default_break (const gchar *text, GUnicodeBreakType break_type; BreakOpportunity break_op; - if (i >= attrs_len) + /* >, not >=, because of the extra newline we stick on the end */ + if (i > attrs_len) { g_warning ("pango_default_break(): the array of PangoLogAttr passed in must have at least N+1 elements, if there are N characters in the text being broken"); return; |