diff options
author | Matt Wilson <msw@redhat.com> | 2001-10-09 19:07:27 +0000 |
---|---|---|
committer | Matt Wilson <msw@src.gnome.org> | 2001-10-09 19:07:27 +0000 |
commit | 41dfb85fffb3e7c0a70917eb9f9c5fec4ac07238 (patch) | |
tree | 7935ef6d7d63406c41565f123decbd482b54c6a2 /pango/pangox.c | |
parent | 53f471854b71daa60be64aea6fa6ad117c54032b (diff) | |
download | pango-41dfb85fffb3e7c0a70917eb9f9c5fec4ac07238.tar.gz |
protect from indexing off the end of the embedding_levels array by only
2001-10-09 Matt Wilson <msw@redhat.com>
* pango/pangox.c (get_font_metrics_from_string): protect from
indexing off the end of the embedding_levels array by only doing
so if we're not finished.
Diffstat (limited to 'pango/pangox.c')
-rw-r--r-- | pango/pangox.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pango/pangox.c b/pango/pangox.c index 26a0189e..c5086604 100644 --- a/pango/pangox.c +++ b/pango/pangox.c @@ -840,11 +840,13 @@ get_font_metrics_from_string (PangoFont *font, } if (!finished) - p = g_utf8_next_char (p); - - last_shaper = shaper; - last_level = embedding_levels[i]; - i++; + { + p = g_utf8_next_char (p); + + last_shaper = shaper; + last_level = embedding_levels[i]; + i++; + } } get_font_metrics_from_subfonts (font, subfonts, metrics); |