unix/main: Use OS-dependent path separator when searching path.

pull/5638/head
stijn 2020-02-04 10:01:52 +01:00 zatwierdzone przez Damien George
rodzic 580fd636c0
commit 8b6e6008c7
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -493,7 +493,7 @@ MP_NOINLINE int main_(int argc, char **argv) {
#endif
}
size_t path_num = 1; // [0] is for current dir (or base dir of the script)
if (*path == ':') {
if (*path == PATHLIST_SEP_CHAR) {
path_num++;
}
for (char *p = path; p != NULL; p = strchr(p, PATHLIST_SEP_CHAR)) {