summaryrefslogtreecommitdiff
path: root/pango/pangox.c
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2001-10-09 19:07:27 +0000
committerMatt Wilson <msw@src.gnome.org>2001-10-09 19:07:27 +0000
commit41dfb85fffb3e7c0a70917eb9f9c5fec4ac07238 (patch)
tree7935ef6d7d63406c41565f123decbd482b54c6a2 /pango/pangox.c
parent53f471854b71daa60be64aea6fa6ad117c54032b (diff)
downloadpango-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.c12
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);