diff options
author | James Bursa <james@netsurf-browser.org> | 2004-05-11 16:40:12 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2004-05-11 16:40:12 +0000 |
commit | 52700ad3cb5315345f9513b5c877cf127b9c1d4a (patch) | |
tree | 35abfc0e12b9473444f2588f8600599f2421eb96 /render/box.c | |
parent | 924fe5c99587d3af5ac0b799e131f17a3db8f597 (diff) | |
download | netsurf-52700ad3cb5315345f9513b5c877cf127b9c1d4a.tar.gz netsurf-52700ad3cb5315345f9513b5c877cf127b9c1d4a.tar.bz2 |
[project @ 2004-05-11 16:40:12 by bursa]
Ignore negative colspan.
svn path=/import/netsurf/; revision=851
Diffstat (limited to 'render/box.c')
-rw-r--r-- | render/box.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/render/box.c b/render/box.c index e5c856978..d1ef50d48 100644 --- a/render/box.c +++ b/render/box.c @@ -316,7 +316,7 @@ struct box * convert_xml_to_box(xmlNode * n, struct content *content, /* extract title attribute, if present */ if ((title0 = xmlGetProp(n, (const xmlChar *) "title"))) { status.title = title = squash_tolat1(title0); - xfree(title0); + xmlFree(title0); } /* special elements */ @@ -520,8 +520,9 @@ struct box * convert_xml_to_box(xmlNode * n, struct content *content, inline_container = 0; if ((s = (char *) xmlGetProp(n, (const xmlChar *) "colspan"))) { - if ((box->columns = strtol(s, 0, 10)) == 0) - box->columns = 1; + int colspan = atoi(s); + if (1 <= colspan && colspan <= 100) + box->columns = colspan; xmlFree(s); } if ((s = (char *) xmlGetProp(n, (const xmlChar *) "rowspan"))) { |