mirror of
https://github.com/unknownworlds/NS.git
synced 2024-11-22 12:41:36 +00:00
Mantis: 1071
o Fixed client command crash git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@197 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
33b04e9f51
commit
2581c48cfc
1 changed files with 8 additions and 1 deletions
|
@ -655,7 +655,14 @@ void ClientCommand( edict_t *pEntity )
|
|||
// max total length is 192 ...and we're adding a string below ("Unknown command: %s\n")
|
||||
strncpy( command, pcmd, 127 );
|
||||
command[127] = '\0';
|
||||
|
||||
// puzl: 1071
|
||||
// Remove printf formatting
|
||||
for ( int i=0; i < 127; i++ ) {
|
||||
if ( command[i] == '%' ) {
|
||||
command[i] = ' ';
|
||||
}
|
||||
}
|
||||
// :puzl
|
||||
// tell the user they entered an unknown command
|
||||
ClientPrint( &pEntity->v, HUD_PRINTCONSOLE, UTIL_VarArgs( "Unknown command: %s\n", command ) );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue