fixed the basename() replacement, reported by Gisle
This commit is contained in:
parent
bb48ccedd7
commit
ec4da97a35
@ -944,9 +944,10 @@ char *basename(char *path)
|
|||||||
if(s1 && s2) {
|
if(s1 && s2) {
|
||||||
path = (s1 > s2? s1 : s2)+1;
|
path = (s1 > s2? s1 : s2)+1;
|
||||||
}
|
}
|
||||||
else {
|
else if(s1)
|
||||||
path = (s1 ? s1 : s2)+1;
|
path = s1 + 1;
|
||||||
}
|
else if(s2)
|
||||||
|
path = s1 + 1;
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user