mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
COM_FileBase should strip .ext.gz instead of leaving the .ext there - the .gz is handled by our filesystem so we try to pretend that its not there. This fixes loading textures/foo/bar.png files from inside foo.bsp.gz files.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5882 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
c76735b1fc
commit
5ceb4730ad
1 changed files with 11 additions and 2 deletions
|
@ -2431,7 +2431,12 @@ void QDECL COM_StripExtension (const char *in, char *out, int outlen)
|
|||
if (*s == '.')
|
||||
{
|
||||
*s = 0;
|
||||
break;
|
||||
|
||||
//some extensions don't really count, strip the next one too...
|
||||
if (!strcmp(s+1,"gz"))
|
||||
;
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
s--;
|
||||
|
@ -2568,8 +2573,12 @@ void COM_FileBase (const char *in, char *out, int outlen)
|
|||
|
||||
s = in + strlen(in) - 1;
|
||||
|
||||
while (s > in && *s != '.' && *s != '/')
|
||||
while (s > in)
|
||||
{
|
||||
if ((*s == '.'&&strcmp(s+1,"gz")) || *s == '/')
|
||||
break;
|
||||
s--;
|
||||
}
|
||||
|
||||
for (s2 = s ; s2 > in && *s2 && *s2 != '/' ; s2--)
|
||||
;
|
||||
|
|
Loading…
Reference in a new issue