diff --git a/src/connect.c b/src/connect.c index 03c1813..eeede78 100644 --- a/src/connect.c +++ b/src/connect.c @@ -593,6 +593,7 @@ static int func_search_entry(NW_PATH *nwpath, int attrib, if (f != (DIR*)NULL) { char *kpath=xkpath+strlen(xkpath); *kpath++ = '/'; + *kpath = '\0'; while ((dirbuff = readdir(f)) != (struct dirent*)NULL){ okflag = 0; if (dirbuff->d_ino) { @@ -678,6 +679,7 @@ static int get_dir_entry(NW_PATH *nwpath, if (f != (DIR*)NULL) { char *kpath=xkpath+strlen(xkpath); *kpath++ = '/'; + *kpath = '\0'; if (*sequence == MAX_U16) *sequence = 0; while (akt_sequence++ < *sequence) {