COM_SkipPath now uses strrchr, it's much more readable now.

This commit is contained in:
Joseph Carter 2001-03-01 07:42:28 +00:00
parent b2a53d4b46
commit 1094e146da
2 changed files with 12 additions and 12 deletions

View file

@ -985,12 +985,12 @@ COM_SkipPath (char *pathname)
{
char *last;
last = pathname;
while (*pathname) {
if (*pathname == '/')
last = pathname + 1;
pathname++;
}
// char after last / on the line
if ((last = strrchr (pathname, '/')))
last++;
else
last = pathname;
return last;
}

View file

@ -1096,12 +1096,12 @@ COM_SkipPath (char *pathname)
{
char *last;
last = pathname;
while (*pathname) {
if (*pathname == '/')
last = pathname + 1;
pathname++;
}
// char after last / on the line
if ((last = strrchr (pathname, '/')))
last++;
else
last = pathname;
return last;
}