mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-05 13:14:59 +00:00
tests/handlers.c: Make accumulate_entity_decl robust towards value==NULL
This commit is contained in:
parent
b0975cb73a
commit
7767efe1aa
1 changed files with 4 additions and 1 deletions
|
@ -1853,7 +1853,10 @@ accumulate_entity_decl(void *userData, const XML_Char *entityName,
|
|||
UNUSED_P(notationName);
|
||||
CharData_AppendXMLChars(storage, entityName, -1);
|
||||
CharData_AppendXMLChars(storage, XCS("="), 1);
|
||||
CharData_AppendXMLChars(storage, value, value_length);
|
||||
if (value == NULL)
|
||||
CharData_AppendXMLChars(storage, XCS("(null)"), -1);
|
||||
else
|
||||
CharData_AppendXMLChars(storage, value, value_length);
|
||||
CharData_AppendXMLChars(storage, XCS("\n"), 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue