Redid COM_StripExtension to only strip from the first dot after the last slash in a filename.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1158 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
e9b8f7899f
commit
b5d6325fe3
1 changed files with 13 additions and 3 deletions
|
@ -1380,9 +1380,19 @@ COM_StripExtension
|
|||
*/
|
||||
void COM_StripExtension (char *in, char *out)
|
||||
{
|
||||
while (*in && *in != '.')
|
||||
*out++ = *in++;
|
||||
*out = 0;
|
||||
char *s;
|
||||
|
||||
strcpy(out, in);
|
||||
|
||||
s = out+strlen(out);
|
||||
|
||||
while(*s != '/' && s != out)
|
||||
{
|
||||
if (*s == '.')
|
||||
*s = 0;
|
||||
|
||||
s--;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue