forked from RepoMirrors/bemenu
Prevent a deadloop in PATH handling
Empty PATH segments should no longer cause a deadloop. Fixes #59
This commit is contained in:
parent
572470ef8c
commit
5d787629a5
@ -66,6 +66,8 @@ get_paths(const char *env, const char *default_paths, struct paths *state)
|
||||
if ((f = strcspn(state->path, ":")) > 0) {
|
||||
state->path += f + (path[f] ? 1 : 0);
|
||||
path[f] = 0;
|
||||
} else {
|
||||
state->path += 1;
|
||||
}
|
||||
|
||||
if (!*path) {
|
||||
|
Loading…
Reference in New Issue
Block a user