summaryrefslogtreecommitdiff
path: root/source/fitz/xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz/xml.c')
-rw-r--r--source/fitz/xml.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/fitz/xml.c b/source/fitz/xml.c
index a9d93eb8..5cdaa673 100644
--- a/source/fitz/xml.c
+++ b/source/fitz/xml.c
@@ -83,7 +83,7 @@ struct fz_xml_s
char name[40];
char *text;
struct attribute *atts;
- fz_xml *up, *down, *prev, *next;
+ fz_xml *up, *down, *tail, *prev, *next;
};
static inline void indent(int n)
@@ -285,13 +285,13 @@ static void xml_emit_open_tag(struct parser *parser, char *a, char *b)
if (!parser->head->down) {
parser->head->down = head;
+ parser->head->tail = head;
}
else {
- tail = parser->head->down;
- while (tail->next)
- tail = tail->next;
+ tail = parser->head->tail;
tail->next = head;
head->prev = tail;
+ parser->head->tail = head;
}
parser->head = head;