summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2013-09-22 17:05:57 +0200
committerYorhel <git@yorhel.nl>2013-09-22 17:05:57 +0200
commitb6943c7407653fbf2ea9bf15c1476788afaf4c87 (patch)
tree076d0ea5b2b6f78eeed1620d4f927acb460d9bd5
parentdb5ece903bed2ec07979d0a20d3ae751513d6ccb (diff)
Fix parsing of XML declaration without encoding but with standalone
-rw-r--r--yxml-states2
-rw-r--r--yxml.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/yxml-states b/yxml-states
index 422524d..3fa5f76 100644
--- a/yxml-states
+++ b/yxml-states
@@ -82,7 +82,7 @@ leq0 'x' "ml" xmldecl0; NameStart @misc1 pi1
xmldecl0 SP xmldecl1
xmldecl1 SP xmldecl1; 'v' "ersion" ver0
xmldecl2 SP xmldecl3; '?' xmldecl7
-xmldecl3 SP xmldecl3; '?' xmldecl7; 'e' "ncoding" enc0; 's' std0
+xmldecl3 SP xmldecl3; '?' xmldecl7; 'e' "ncoding" enc0; 's' "tandalone" std0
xmldecl4 SP xmldecl5; '?' xmldecl7
xmldecl5 SP xmldecl5; '?' xmldecl7; 's' "tandalone" std0
xmldecl6 SP xmldecl6; '?' xmldecl7
diff --git a/yxml.c b/yxml.c
index 2246863..581cad6 100644
--- a/yxml.c
+++ b/yxml.c
@@ -912,7 +912,9 @@ yxml_ret_t yxml_parse(yxml_t *x, int _ch) {
return YXML_OK;
}
if(ch == (unsigned char)'s') {
- x->state = YXMLS_std0;
+ x->state = YXMLS_string;
+ x->nextstate = YXMLS_std0;
+ x->string = (unsigned char *)"tandalone";
return YXML_OK;
}
break;