Skip to content

Commit

Permalink
public: use Q_strchr in COM_FixSlashes
Browse files Browse the repository at this point in the history
  • Loading branch information
a1batross committed Jul 4, 2024
1 parent 58bfa24 commit bc32f37
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions public/crtlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,10 +677,9 @@ Changes all '\' characters into '/' characters, in place.
*/
void COM_FixSlashes( char *pname )
{
for( ; *pname; pname++ )
while(( pname = Q_strchr( pname, '\\' )))
{
if( *pname == '\\' )
*pname = '/';
*pname = '/';
}
}

Expand Down

0 comments on commit bc32f37

Please sign in to comment.