]> granicus.if.org Git - libexpat/commitdiff
Fix bug with returning wrong number of attributes.
authorJames Clark <jjc@jclark.com>
Sat, 9 Jan 1999 01:43:27 +0000 (01:43 +0000)
committerJames Clark <jjc@jclark.com>
Sat, 9 Jan 1999 01:43:27 +0000 (01:43 +0000)
expat/xmltok/xmltok_impl.c

index 293c53b7f36103a724d600a448940d93889d6a1a..f35938128ad7bb2cb2a3fa54a457929178c26f8b 100755 (executable)
@@ -1413,7 +1413,8 @@ int PREFIX(getAtts)(const ENCODING *enc, const char *ptr,
       else if (open == BT_QUOT) {
         state = other;
        if (nAtts < attsMax)
-         atts[nAtts++].valueEnd = ptr;
+         atts[nAtts].valueEnd = ptr;
+       nAtts++;
       }
       break;
     case BT_APOS:
@@ -1426,7 +1427,8 @@ int PREFIX(getAtts)(const ENCODING *enc, const char *ptr,
       else if (open == BT_APOS) {
         state = other;
        if (nAtts < attsMax)
-         atts[nAtts++].valueEnd = ptr;
+         atts[nAtts].valueEnd = ptr;
+       nAtts++;
       }
       break;
     case BT_AMP: