mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-10 09:41:09 +00:00
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:
parent
08c736b005
commit
564b2e2609
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue