Commit ec4da97a authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

fixed the basename() replacement, reported by Gisle

parent bb48cced
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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;
}