Don't allow attributes without values.

This commit is contained in:
Michael R Sweet 2007-09-09 08:22:12 +00:00
parent 7da48b7de7
commit f5993028ff
2 changed files with 6 additions and 6 deletions

View File

@ -3,6 +3,8 @@ CHANGES - 2007-09-09
CHANGES IN Mini-XML 2.3.1
- mxmlLoad*() incorrectly allowed attributes without values
(STR #47)
- Fixed Visual C++ build problems (STR #49)
- mxmlLoad*() did not return NULL when an element contained
an error (STR #46)

View File

@ -2255,7 +2255,7 @@ mxml_parse_element(
{
mxml_error("Missing value for attribute '%s' in element %s!",
name, node->value.element.name);
return (EOF);
goto error;
}
if (ch == '\'' || ch == '\"')
@ -2315,11 +2315,9 @@ mxml_parse_element(
}
else
{
/*
* Set the attribute with a NULL value...
*/
mxmlElementSetAttr(node, name, NULL);
mxml_error("Missing value for attribute '%s' in element %s!",
name, node->value.element.name);
goto error;
}
/*