engine: client: support vox sentence that starts with leading slash
This commit is contained in:
parent
8452bec877
commit
4ec6c2f7cf
1 changed files with 8 additions and 2 deletions
|
@ -248,6 +248,12 @@ static const char *VOX_GetDirectory( char *szpath, const char *psz, int nsize )
|
|||
const char *p;
|
||||
int len;
|
||||
|
||||
// HACKHACK: some modders send strings like "/fvox/_period four"
|
||||
// which should get parsed as "_period four" said by fvox
|
||||
// it might be incorrect but ignore first slash here for now
|
||||
if( psz[0] == '/' )
|
||||
psz++;
|
||||
|
||||
// search / backwards
|
||||
p = Q_strrchr( psz, '/' );
|
||||
|
||||
|
@ -595,8 +601,8 @@ static void Test_VOX_GetDirectory( void )
|
|||
{
|
||||
"", "", "vox/",
|
||||
"bark bark", "bark bark", "vox/",
|
||||
"barney/meow", "meow", "barney/"
|
||||
|
||||
"barney/meow", "meow", "barney/",
|
||||
"/fvox/_period", "_period", "fvox/",
|
||||
};
|
||||
int i;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue