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

index b0da77ce4f912b58f4d539e8254752fa22581810..20f24a90ea488d32ffc6cd8d85ef65ca21c9c89b 100644 (file)
@@ -4678,7 +4678,7 @@ external_entity_not_standalone(XML_Parser parser,
     ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL);
     if (ext_parser == NULL)
         fail("Could not create external entity parser");
-    if (!strcmp(systemId, "foo")) {
+    if (!xcstrcmp(systemId, XCS("foo"))) {
         XML_SetNotStandaloneHandler(ext_parser,
                                     reject_not_standalone_handler);
         if (_XML_Parse_SINGLE_BYTES(ext_parser, text1, strlen(text1),
@@ -4690,7 +4690,7 @@ external_entity_not_standalone(XML_Parser parser,
         XML_ParserFree(ext_parser);
         return XML_STATUS_ERROR;
     }
-    else if (!strcmp(systemId, "bar")) {
+    else if (!xcstrcmp(systemId, XCS("bar"))) {
         if (_XML_Parse_SINGLE_BYTES(ext_parser, text2, strlen(text2),
                                     XML_TRUE) == XML_STATUS_ERROR)
             xml_failure(ext_parser);