[project @ 2005-04-27 19:13:30 by bursa]

Fix cellpadding="0".

svn path=/import/netsurf/; revision=1688
This commit is contained in:
James Bursa 2005-04-27 19:13:30 +00:00
parent 019043df82
commit ee8b6f0628
1 changed files with 4 additions and 2 deletions

View File

@ -397,8 +397,10 @@ bool box_construct_element(xmlNode *n, struct content *content,
border_color = 0x888888; /* default colour */
if ((s = (char *) xmlGetProp(n,
(const xmlChar *) "cellpadding"))) {
int value = atoi(s);
if (!strrchr(s, '%') && 0 < value) /* % not implemented */
char *endp;
long value = strtol(s, &endp, 10);
if (*endp == 0 && 0 <= value && value < 1000)
/* % not implemented */
box_set_cellpadding(box, value);
xmlFree(s);
}