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

index fa8f8a1e05d45da25d60e5eb016c635bbe89c183..77cca24174c92a870f9c28b1eda3db6129049368 100644 (file)
@@ -4942,10 +4942,10 @@ external_entity_public(XML_Parser parser,
     ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL);
     if (ext_parser == NULL)
         return XML_STATUS_ERROR;
-    if (systemId != NULL && !strcmp(systemId, "http://example.org/")) {
+    if (systemId != NULL && !xcstrcmp(systemId, XCS("http://example.org/"))) {
         text = text1;
     }
-    else if (publicId != NULL && !strcmp(publicId, "foo")) {
+    else if (publicId != NULL && !xcstrcmp(publicId, XCS("foo"))) {
         text = text2;
     }
     else