Check bounds before, not after.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3297 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2009-07-18 09:35:38 +00:00
parent db97dd67d0
commit ccf1338d41
1 changed files with 1 additions and 4 deletions

View File

@ -1576,12 +1576,9 @@ void COM_FileBase (const char *in, char *out, int outlen)
while (s > in && *s != '.')
s--;
for (s2 = s ; *s2 && *s2 != '/' ; s2--)
for (s2 = s ; s2 > in && *s2 && *s2 != '/' ; s2--)
;
if (in > s2)
s2 = in;
if (s-s2 < 2)
{
if (s == s2)