Jelajahi Sumber

Minor fix for odd PATH entries.

Ryan C. Gordon 23 tahun lalu
induk
melakukan
c79285af0e
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      platform/unix.c

+ 1 - 1
platform/unix.c

@@ -221,7 +221,7 @@ static char *findBinaryInPath(const char *bin, char *envr)
 
 
         /* build full binary path... */
         /* build full binary path... */
         strcpy(exe, start);
         strcpy(exe, start);
-        if (exe[strlen(exe) - 1] != '/')
+        if ((exe[0] == '\0') || (exe[strlen(exe) - 1] != '/'))
             strcat(exe, "/");
             strcat(exe, "/");
         strcat(exe, bin);
         strcat(exe, bin);