aboutsummaryrefslogtreecommitdiffstats
path: root/code
diff options
context:
space:
mode:
authoricculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-09-14 23:56:09 +0000
committericculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-09-14 23:56:09 +0000
commit8296a890684cf72ad241b4ad926003d69606c247 (patch)
treec23cbd247b7c839b1096dffbd4e9fc2eedac80cd /code
parent9dc1c54bc977dc895ca678b5f7cf30e04a294e0a (diff)
downloadioquake3-aero-8296a890684cf72ad241b4ad926003d69606c247.tar.gz
ioquake3-aero-8296a890684cf72ad241b4ad926003d69606c247.zip
Don't allow negative arguments to the "wait" console command.
git-svn-id: svn://svn.icculus.org/quake3/trunk@1601 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code')
-rw-r--r--code/qcommon/cmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/code/qcommon/cmd.c b/code/qcommon/cmd.c
index 8b14c2a..c938158 100644
--- a/code/qcommon/cmd.c
+++ b/code/qcommon/cmd.c
@@ -52,6 +52,8 @@ bind g "cmd use rocket ; +attack ; wait ; -attack ; cmd use blaster"
void Cmd_Wait_f( void ) {
if ( Cmd_Argc() == 2 ) {
cmd_wait = atoi( Cmd_Argv( 1 ) );
+ if ( cmd_wait < 0 )
+ cmd_wait = 1; // ignore the argument
} else {
cmd_wait = 1;
}
@@ -176,7 +178,7 @@ void Cbuf_Execute (void)
while (cmd_text.cursize)
{
- if ( cmd_wait ) {
+ if ( cmd_wait > 0 ) {
// skip out while text still remains in buffer, leaving it
// for next frame
cmd_wait--;