diff --git a/platform/unix.c b/platform/unix.c index 48017b7..5b8b7b5 100644 --- a/platform/unix.c +++ b/platform/unix.c @@ -221,7 +221,7 @@ static char *findBinaryInPath(const char *bin, char *envr) /* build full binary path... */ strcpy(exe, start); - if (exe[strlen(exe) - 1] != '/') + if ((exe[0] == '\0') || (exe[strlen(exe) - 1] != '/')) strcat(exe, "/"); strcat(exe, bin);