1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-08-24 09:49:22 +03:00

Armin Sander pointed a possible text coalescing problem, completed his

* tree.c: Armin Sander pointed a possible text coalescing
  problem, completed his patch.
Daniel
This commit is contained in:
Daniel Veillard
2001-08-31 20:03:19 +00:00
parent 0b2ae439f6
commit 9e1c72da8a
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Fri Aug 31 22:02:10 CEST 2001 Daniel Veillard <daniel@veillard.com>
* tree.c: Armin Sander pointed a possible text coalescing
problem, completed his patch.
Fri Aug 31 18:30:28 CEST 2001 Bjorn Reese <breese@users.sourceforge.net>
* trionan.c: Fixed const and volatile re-definition problem

6
tree.c
View File

@ -1968,7 +1968,8 @@ xmlAddNextSibling(xmlNodePtr cur, xmlNodePtr elem) {
xmlFreeNode(elem);
return(cur);
}
if ((cur->next != NULL) && (cur->type == XML_TEXT_NODE)) {
if ((cur->next != NULL) && (cur->next->type == XML_TEXT_NODE) &&
(cur->name == cur->next->name)) {
#ifndef XML_USE_BUFFER_CONTENT
xmlChar *tmp;
@ -2047,7 +2048,8 @@ xmlAddPrevSibling(xmlNodePtr cur, xmlNodePtr elem) {
xmlFreeNode(elem);
return(cur);
}
if ((cur->prev != NULL) && (cur->prev->type == XML_TEXT_NODE)) {
if ((cur->prev != NULL) && (cur->prev->type == XML_TEXT_NODE) &&
(cur->name == cur->prev->name)) {
#ifndef XML_USE_BUFFER_CONTENT
xmlNodeAddContent(cur->prev, elem->content);
#else