mirror of
https://github.com/curl/curl.git
synced 2026-06-24 06:35:38 +03:00
fixed the basename() replacement, reported by Gisle
This commit is contained in:
parent
bb48ccedd7
commit
ec4da97a35
1 changed files with 4 additions and 3 deletions
|
|
@ -944,9 +944,10 @@ char *basename(char *path)
|
|||
if(s1 && s2) {
|
||||
path = (s1 > s2? s1 : s2)+1;
|
||||
}
|
||||
else {
|
||||
path = (s1 ? s1 : s2)+1;
|
||||
}
|
||||
else if(s1)
|
||||
path = s1 + 1;
|
||||
else if(s2)
|
||||
path = s1 + 1;
|
||||
|
||||
return path;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue