Handle empty string in search path; It means: current directory
This commit is contained in:
parent
59ea3478ac
commit
9baa112ea1
|
@ -233,8 +233,10 @@ INP_mk_filename(dir, file, newname)
|
|||
dst = malloc((unsigned) (strlen(dir) + strlen(file) + 2));
|
||||
if (!dst) return 0;
|
||||
*newname = dst;
|
||||
if (*dir) {
|
||||
while (*dst++ = *dir++);
|
||||
*--dst = '/';
|
||||
}
|
||||
while (*++dst = *file++);
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue