diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2019-02-05 01:59:40 -0500 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2019-02-05 01:59:40 -0500 |
| commit | b374539be00077f38c9875ee4036fc37d07b07a2 (patch) | |
| tree | 2d2e2affc4c11bd8a95c511345d065ccfa9e7592 | |
| parent | e27c7319c5ff2f59acdebef3a7e0995ae5e05f3a (diff) | |
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.
| -rw-r--r-- | sway/config.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |
