git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8029
d7cf8633-e32d-0410-b094-
e92efae38249
{
#ifdef FS_FIX_PATHS
char fixedFileName[MAX_QPATH];
- char *d = fixedFileName;
+ char *d;
+ strlcpy( fixedFileName, filepath, MAX_QPATH );
// try to fix common mistakes (\ instead of /)
- for( ; *filepath ; filepath++, d++ )
- if( *filepath != '\\' )
- *d = *filepath;
- else
+ for( d = fixedFileName ; *d ; d++ )
+ if( *d == '\\' )
*d = '/';
- *d = '\0';
filepath = fixedFileName;
#endif