expat/lib xmltok_impl.c,1.9,1.10

"Karl Waclawek" <[email protected]>
Newsgroups gmane.text.xml.expat.cvs
Message-ID <[email protected]>
Update of /cvsroot/expat/expat/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv30743

Modified Files:
	xmltok_impl.c 
Log Message:
Expat would report an incorrect "Unlosed token" error when 
expanding %percent; in the second of these entity declarations:

<!ENTITY % percent "&#37;">
<!ENTITY %percent; y "value">

This patch was submitted by James Clark on the xml-dev mailing list.

Index: xmltok_impl.c
===================================================================
RCS file: /cvsroot/expat/expat/lib/xmltok_impl.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- xmltok_impl.c	20 Sep 2002 03:42:43 -0000	1.9
+++ xmltok_impl.c	3 Jul 2003 04:01:14 -0000	1.10
@@ -882,7 +882,7 @@
                     const char **nextTokPtr)
 {
   if (ptr == end)
-    return XML_TOK_PARTIAL;
+    return -XML_TOK_PERCENT;
   switch (BYTE_TYPE(enc, ptr)) {
   CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
   case BT_S: case BT_LF: case BT_CR: case BT_PERCNT:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.