Fix parsing of XML declaration without encoding but with standalone
diff --git a/yxml-states b/yxml-states
index 422524d..3fa5f76 100644
--- a/yxml-states
+++ b/yxml-states
@@ -82,7 +82,7 @@
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 @@
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;