Commit ccc4d2b6 authored by Daniel Veillard's avatar Daniel Veillard

two small improvements Daniel

* dict.c xmlreader.c: two small improvements
Daniel
parent a66b1d1a
Wed Sep 17 23:25:47 CEST 2003 Daniel Veillard <daniel@veillard.com>
* dict.c xmlreader.c: two small improvements
Wed Sep 17 22:53:32 CEST 2003 Daniel Veillard <daniel@veillard.com>
* parserInternals.c: avoid a leak with previous patch
......
......@@ -338,6 +338,9 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) {
if ((dict == NULL) || (name == NULL))
return(NULL);
if ((name[len] == 0) && (xmlDictOwns(dict, name) == 1))
return(name);
if (len < 0)
len = xmlStrlen(name);
......
......@@ -1272,6 +1272,7 @@ node_found:
* If we are in the middle of a piece of CDATA make sure it's finished
*/
if ((reader->node != NULL) &&
(reader->node->next == NULL) &&
((reader->node->type == XML_TEXT_NODE) ||
(reader->node->type == XML_CDATA_SECTION_NODE))) {
xmlTextReaderExpand(reader);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment