]> granicus.if.org Git - libexpat/commitdiff
Fix external_entity_valuer() to work for UTF-16 builds
authorRhodri James <rhodri@kynesim.co.uk>
Tue, 22 Aug 2017 14:19:36 +0000 (15:19 +0100)
committerSebastian Pipping <sebastian@pipping.org>
Tue, 29 Aug 2017 21:13:13 +0000 (23:13 +0200)
expat/tests/runtests.c

index 2166be950812513e27cfc2f187bf6819338854bf..b0da77ce4f912b58f4d539e8254752fa22581810 100644 (file)
@@ -4537,12 +4537,12 @@ external_entity_valuer(XML_Parser parser,
     ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL);
     if (ext_parser == NULL)
         fail("Could not create external entity parser");
-    if (!strcmp(systemId, "004-1.ent")) {
+    if (!xcstrcmp(systemId, XCS("004-1.ent"))) {
         if (_XML_Parse_SINGLE_BYTES(ext_parser, text1, strlen(text1),
                                     XML_TRUE) == XML_STATUS_ERROR)
             xml_failure(ext_parser);
     }
-    else if (!strcmp(systemId, "004-2.ent")) {
+    else if (!xcstrcmp(systemId, XCS("004-2.ent"))) {
         ExtFaults *fault = (ExtFaults *)XML_GetUserData(parser);
         enum XML_Status status;
         enum XML_Error error;