Skip to content

Commit

Permalink
do not bother testing string length, just cut it off anyway
Browse files Browse the repository at this point in the history
  • Loading branch information
joe0x04 committed Oct 16, 2019
1 parent 12e5b04 commit 3a69f94
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions g_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2209,9 +2209,7 @@ void sayPersonLowRun(int startarg, edict_t *ent, int client) {

// make sure the text doesn't overflow the internal buffer...
if (enti) {
if (q2a_strlen(text) > MAX_STRING_CHARS - 40) {
text[MAX_STRING_CHARS - 40] = 0;
}
text[MAX_STRING_CHARS - 40] = 0;

// for server console
Q_snprintf(tmptext, sizeof(tmptext), "%s-> %s\n", proxyinfo[clienti].name, text);
Expand Down

0 comments on commit 3a69f94

Please sign in to comment.