summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kerpe <toke@toke.de>2019-06-05 15:59:16 +0200
committerThomas Kerpe <toke@toke.de>2019-06-05 15:59:16 +0200
commit5d787629a55cd4ec5ba577559d2c95cccd24282e (patch)
tree17dce7df68d8cf84fb584e0dd1ac45980c0367a8
parent572470ef8cc4725728b239fe5fa65f62f9d70dd4 (diff)
downloadbemenu-5d787629a55cd4ec5ba577559d2c95cccd24282e.tar.gz
bemenu-5d787629a55cd4ec5ba577559d2c95cccd24282e.tar.bz2
bemenu-5d787629a55cd4ec5ba577559d2c95cccd24282e.zip
Prevent a deadloop in PATH handling
Empty PATH segments should no longer cause a deadloop. Fixes #59
-rw-r--r--client/bemenu-run.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/client/bemenu-run.c b/client/bemenu-run.c
index 20efd77..4feacf9 100644
--- a/client/bemenu-run.c
+++ b/client/bemenu-run.c
@@ -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) {