mirror of
https://github.com/swaywm/sway.git
synced 2024-12-30 17:06:40 +01:00
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.
This commit is contained in:
parent
a1a99421a1
commit
920c64f569
1 changed files with 1 additions and 1 deletions
|
@ -557,7 +557,7 @@ bool load_include_configs(const char *path, struct sway_config *config,
|
||||||
|
|
||||||
wordexp_t p;
|
wordexp_t p;
|
||||||
|
|
||||||
if (wordexp(path, &p, 0) < 0) {
|
if (wordexp(path, &p, 0) != 0) {
|
||||||
free(parent_path);
|
free(parent_path);
|
||||||
free(wd);
|
free(wd);
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue