commit a61f447

Michael Forney  ·  2013-07-17 08:47:27 +0000 UTC
parent 5e4aa91
Fix text extents loop
1 files changed,  +1, -1
M font.c
M font.c
+1, -1
1@@ -213,7 +213,7 @@ void wld_font_text_extents_utf8_n(struct wld_font * font_base,
2 
3     extents->advance = 0;
4 
5-    while ((ret = FcUtf8ToUcs4((FcChar8 *) text, &c, length) > 0))
6+    while ((ret = FcUtf8ToUcs4((FcChar8 *) text, &c, length) > 0) && c != '\0')
7     {
8         length -= ret;
9         text += ret;