Explorar el Código

Minor fix for odd PATH entries.

Ryan C. Gordon hace 23 años
padre
commit
c79285af0e
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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);