summaryrefslogtreecommitdiff
path: root/entities.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>1999-12-28 16:35:14 +0000
committerDaniel Veillard <veillard@src.gnome.org>1999-12-28 16:35:14 +0000
commitdbfd641b78b5a98e790459e13d126e2784a7adeb (patch)
tree9f7fce862646ec3feaad8e8ba23bbec56187d8aa /entities.c
parentfef854d2347ea4a6bab052b93d0e591317d2a94a (diff)
downloadlibxml2-dbfd641b78b5a98e790459e13d126e2784a7adeb.tar.gz
- Lots of improvements, too long to list here
- Push mode for the XML parser (HTML to come) - XML shell like interface for debug - improvements on XPath and validation Daniel
Diffstat (limited to 'entities.c')
-rw-r--r--entities.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/entities.c b/entities.c
index 2e736843..027acd05 100644
--- a/entities.c
+++ b/entities.c
@@ -114,10 +114,13 @@ xmlAddEntity(xmlEntitiesTablePtr table, const xmlChar *name, int type,
cur->SystemID = xmlStrdup(SystemID);
else
cur->SystemID = NULL;
- if (content != NULL)
- cur->content = xmlStrdup(content);
- else
+ if (content != NULL) {
+ cur->length = xmlStrlen(content);
+ cur->content = xmlStrndup(content, cur->length);
+ } else {
+ cur->length = 0;
cur->content = NULL;
+ }
cur->orig = NULL;
table->nb_entities++;
}