From df3ea6a55f4a163ce5d1f241060a1308198ff27a Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Tue, 5 Feb 2019 01:59:40 -0500 Subject: load_include_configs: fix wordexp fail condition This fixes the failure condition for the wordexp call in load_include_configs. The only success value is zero. Since the error codes are positive, having the check be less than zero was causing segfaults on failure when accessing the words. --- sway/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/config.c b/sway/config.c index ee1c42df..0c23fad8 100644 --- a/sway/config.c +++ b/sway/config.c @@ -557,7 +557,7 @@ bool load_include_configs(const char *path, struct sway_config *config, wordexp_t p; - if (wordexp(path, &p, 0) < 0) { + if (wordexp(path, &p, 0) != 0) { free(parent_path); free(wd); return false; -- cgit v1.2.3-54-g00ecf