From d12be00da8b67bea013524cabad82cee62423a1a Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Fri, 4 Feb 2022 14:13:59 +0100 Subject: [PATCH] Don't ignore xmllint options after "-" There's no reason to ignore options after "-". This was probably confused with the "--" mechanism which xmllint doesn't implement. Fixes #290. --- xmllint.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/xmllint.c b/xmllint.c index 24768bc9..4d541d9b 100644 --- a/xmllint.c +++ b/xmllint.c @@ -3181,8 +3181,6 @@ main(int argc, char **argv) { /* xmlMemSetup must be called before initializing the parser. */ for (i = 1; i < argc ; i++) { - if (!strcmp(argv[i], "-")) - break; if (argv[i][0] != '-') continue; @@ -3200,11 +3198,9 @@ main(int argc, char **argv) { LIBXML_TEST_VERSION for (i = 1; i < argc ; i++) { - if (!strcmp(argv[i], "-")) - break; - if (argv[i][0] != '-') continue; + if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug"))) debug++; else