misc/libphysfs/platform_unix.c
changeset 9799 a3fe81c3bc02
parent 8524 a65e9bcf0a03
child 12213 bb5522e88ab2
equal deleted inserted replaced
9797:1fdc1507e42d 9799:a3fe81c3bc02
   191             strcat(exe, "/");
   191             strcat(exe, "/");
   192         strcat(exe, bin);
   192         strcat(exe, bin);
   193 
   193 
   194         if (access(exe, X_OK) == 0)  /* Exists as executable? We're done. */
   194         if (access(exe, X_OK) == 0)  /* Exists as executable? We're done. */
   195         {
   195         {
   196             exe[size - binlen] = '\0'; /* chop off filename, leave '/' */
   196             exe[size - binlen - 1] = '\0'; /* chop off filename, leave '/' */
   197             return exe;
   197             return exe;
   198         } /* if */
   198         } /* if */
   199 
   199 
   200         start = ptr + 1;  /* start points to beginning of next element. */
   200         start = ptr + 1;  /* start points to beginning of next element. */
   201     } while (ptr != NULL);
   201     } while (ptr != NULL);