فهرست منبع

Minor fix for odd PATH entries.

Ryan C. Gordon 23 سال پیش
والد
کامیت
c79285af0e
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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... */
         strcpy(exe, start);
-        if (exe[strlen(exe) - 1] != '/')
+        if ((exe[0] == '\0') || (exe[strlen(exe) - 1] != '/'))
             strcat(exe, "/");
         strcat(exe, bin);