1
0
Fork 0
forked from fte/fteqw

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:
Mark Olsen 2005-07-25 13:23:42 +00:00
parent e9b8f7899f
commit b5d6325fe3

View file

@ -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--;
}
}
/*