[Expat-checkins] expat/lib xmltok_impl.c,1.9,1.10

Karl Waclawek kwaclaw at users.sourceforge.net
Wed Jul 2 22:01:17 EDT 2003


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:





More information about the Expat-checkins mailing list