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

whole memory for the nul terminator.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@3 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2010-02-15 23:30:23 +00:00
parent db613ab35d
commit 383e3900ea

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)