common.c (COM_FileBase): fix an old quake bug where it can start hunting

whole memory for the nul terminator.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@3 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2010-02-15 23:30:23 +00:00
parent 08c736b005
commit 564b2e2609
1 changed files with 1 additions and 1 deletions

View File

@ -928,7 +928,7 @@ void COM_FileBase (char *in, char *out)
while (s != in && *s != '.')
s--;
for (s2 = s ; *s2 && *s2 != '/' ; s2--)
for (s2 = s ; s2 != in && *s2 && *s2 != '/' ; s2--)
;
if (s-s2 < 2)