summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristopher Schwarz <lakitu7@gmail.com>2011-07-05 23:57:24 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:18:09 +0000
commitd4afeac5a575c3c865ea8d592dd85d248a79185d (patch)
treeb8d586609214f191de2ee0d300bac4e8c682d5a0 /src
parent789afa4226b385d424988998206bf55d2b3d7fe6 (diff)
* Fix broken vote display strings, when reasons are used, broken in the ioq3 merge. If other things use Com_Sprintf with a string inside itself, they are probably broken too, so be on the lookout
Diffstat (limited to 'src')
-rw-r--r--src/game/g_cmds.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 046622a7..6a67c1db 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -1292,9 +1292,8 @@ void Cmd_CallVote_f( gentity_t *ent )
sizeof( level.voteDisplayString[ team ] ), "Kick player '%s'", name );
if( reason[ 0 ] )
{
- Com_sprintf( level.voteDisplayString[ team ],
- sizeof( level.voteDisplayString[ team ] ), "%s for '%s'",
- level.voteDisplayString[ team ], reason );
+ Q_strcat( level.voteDisplayString[ team ],
+ sizeof( level.voteDisplayString[ team ] ), va( " for '%s'", reason ) );
}
}
else if( team == TEAM_NONE )
@@ -1315,9 +1314,8 @@ void Cmd_CallVote_f( gentity_t *ent )
"Mute player '%s'", name );
if( reason[ 0 ] )
{
- Com_sprintf( level.voteDisplayString[ team ],
- sizeof( level.voteDisplayString[ team ] ), "%s for '%s'",
- level.voteDisplayString[ team ], reason );
+ Q_strcat( level.voteDisplayString[ team ],
+ sizeof( level.voteDisplayString[ team ] ), va( " for '%s'", reason ) );
}
}
else if( !Q_stricmp( vote, "unmute" ) )
@@ -1441,9 +1439,8 @@ void Cmd_CallVote_f( gentity_t *ent )
"Take away building rights from '%s'", name );
if( reason[ 0 ] )
{
- Com_sprintf( level.voteDisplayString[ team ],
- sizeof( level.voteDisplayString[ team ] ), "%s for '%s'",
- level.voteDisplayString[ team ], reason );
+ Q_strcat( level.voteDisplayString[ team ],
+ sizeof( level.voteDisplayString[ team ] ), va( " for '%s'", reason ) );
}
}
else if( !Q_stricmp( vote, "allowbuild" ) )