Don't allow attributes without values.

pull/193/head
Michael R Sweet 17 years ago
parent 7da48b7de7
commit f5993028ff
  1. 2
      CHANGES
  2. 10
      mxml-file.c

@ -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)

@ -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;
}
/*

Loading…
Cancel
Save