summaryrefslogtreecommitdiff
path: root/parser.c
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2004-05-17 06:56:59 +0000
committerMike Hommey <mh@glandium.org>2004-05-17 06:56:59 +0000
commitd4e028c96af89ade493b440d4f2de6b684c03a06 (patch)
tree4b74b3cd4b14524309bc5a3e776d81d4bbc5efe4 /parser.c
parent81bcf076ea11e114a60e429338a15748066de163 (diff)
downloadlibxml2-upstream/2.6.10.tar.gz
Load /tmp/tmp.QVLX5b/libxml2-2.6.10 intoupstream/2.6.10
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/parser.c b/parser.c
index 7662929..d038e46 100644
--- a/parser.c
+++ b/parser.c
@@ -4794,8 +4794,13 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) {
}
NEXT;
if (RAW == '?') {
- if (ret != NULL)
- ret->ocur = XML_ELEMENT_CONTENT_OPT;
+ if (ret != NULL) {
+ if ((ret->ocur == XML_ELEMENT_CONTENT_PLUS) ||
+ (ret->ocur == XML_ELEMENT_CONTENT_MULT))
+ ret->ocur = XML_ELEMENT_CONTENT_MULT;
+ else
+ ret->ocur = XML_ELEMENT_CONTENT_OPT;
+ }
NEXT;
} else if (RAW == '*') {
if (ret != NULL) {
@@ -4822,7 +4827,11 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) {
if (ret != NULL) {
int found = 0;
- ret->ocur = XML_ELEMENT_CONTENT_PLUS;
+ if ((ret->ocur == XML_ELEMENT_CONTENT_OPT) ||
+ (ret->ocur == XML_ELEMENT_CONTENT_MULT))
+ ret->ocur = XML_ELEMENT_CONTENT_MULT;
+ else
+ ret->ocur = XML_ELEMENT_CONTENT_PLUS;
/*
* Some normalization:
* (a | b*)+ == (a | b)*
@@ -7580,7 +7589,7 @@ xmlParseEndTag2(xmlParserCtxtPtr ctxt, const xmlChar *prefix,
}
SKIP(2);
- if ((tlen > 0) && (memcmp(ctxt->input->cur, ctxt->name, tlen) == 0)) {
+ if ((tlen > 0) && (strncmp(ctxt->input->cur, ctxt->name, tlen) == 0)) {
if (ctxt->input->cur[tlen] == '>') {
ctxt->input->cur += tlen + 1;
goto done;