mirror of
https://github.com/michaelrsweet/mxml.git
synced 2024-11-13 07:15:30 +00:00
Don't allow attributes without values.
This commit is contained in:
parent
7da48b7de7
commit
f5993028ff
2
CHANGES
2
CHANGES
@ -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)
|
||||
|
10
mxml-file.c
10
mxml-file.c
@ -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…
Reference in New Issue
Block a user