mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-25 11:19:59 +01:00
public: disallow backslashes in COM_PathSlashFix
This commit is contained in:
parent
107d4cdd61
commit
2f26fcdc2a
@ -686,15 +686,19 @@ void COM_FixSlashes( char *pname )
|
||||
/*
|
||||
============
|
||||
COM_PathSlashFix
|
||||
|
||||
ensure directory path always ends on forward slash
|
||||
============
|
||||
*/
|
||||
void COM_PathSlashFix( char *path )
|
||||
{
|
||||
size_t len;
|
||||
size_t len = Q_strlen( path );
|
||||
|
||||
len = Q_strlen( path );
|
||||
|
||||
if( path[len - 1] != '\\' && path[len - 1] != '/' )
|
||||
if( path[len - 1] == '\\' )
|
||||
{
|
||||
path[len - 1] = '/';
|
||||
}
|
||||
else if( path[len - 1] != '/' )
|
||||
{
|
||||
path[len] = '/';
|
||||
path[len + 1] = '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user