[project @ 2005-04-09 13:26:57 by bursa]

Fix nsfont_width() and nsfont_paint() when passed a 0-length string.

svn path=/import/netsurf/; revision=1615
This commit is contained in:
James Bursa 2005-04-09 13:26:57 +00:00
parent 49fdeafbbf
commit 35770a2572

View File

@ -48,8 +48,10 @@ bool nsfont_width(const struct css_style *style,
PangoContext *context;
PangoLayout *layout;
if (length == 0)
return 0;
if (length == 0) {
*width = 0;
return true;
}
desc = nsfont_style_to_description(style);
context = gdk_pango_context_get();
@ -190,7 +192,7 @@ bool nsfont_paint(const struct css_style *style,
((c & 0xff0000) >> 8) | (c & 0xff0000 >> 16) };
if (length == 0)
return 0;
return true;
desc = nsfont_style_to_description(style);
context = gdk_pango_context_get();