From 94c0b1b43f34535adf39e4371b30c4941feaf358 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Tue, 9 Jun 2020 16:37:37 +0200
Subject: [PATCH] Fix a logic mistake in parser_get_opt_param_string() that was
 hidden by the spurious space added to the default values of strings.

---
 src/parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/parser.c b/src/parser.c
index b18f659ab7..01c0c87eaa 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -750,7 +750,7 @@ void parser_get_opt_param_string(struct swift_params *params, const char *name,
       strcpy(retParam, params->data[i].value);
 
       /* Ensure same behavior if called multiple times for same parameter */
-      if (params->data[i].is_default && !strcmp(def, retParam))
+      if (params->data[i].is_default && strcmp(def, retParam) != 0)
         error(
             "Tried parsing %s again but cannot parse a parameter with "
             "two different default value ('%s' != '%s')",
-- 
GitLab