From 5627d060701fd100788645ec5c431259091e5376 Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Wed, 9 Jan 2019 13:07:08 +0100 Subject: [PATCH] Pass NULL instead of empty string to option parser A bug, introduced in #576. If alignment isn't set in the config, the settings would print a warning about an invalid value. But actually it's just the default string, which can't get parsed. The fallback value should get handled by a false return value and not by the option_get_string's default value. --- src/settings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings.c b/src/settings.c index d4bcba2..2f6a7b5 100644 --- a/src/settings.c +++ b/src/settings.c @@ -277,7 +277,7 @@ void load_settings(char *cmdline_config_path) { char *c = option_get_string( "global", - "alignment", "-align/-alignment", "", + "alignment", "-align/-alignment", NULL, "Text alignment left/center/right" );