mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-13 22:33:32 +00:00
Merge branch 'slash-n' into 'next'
add checks for \n in chat messages See merge request STJr/SRB2!2170
This commit is contained in:
commit
279820cd6c
1 changed files with 3 additions and 1 deletions
|
@ -714,10 +714,12 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum)
|
||||||
// Clean up message a bit
|
// Clean up message a bit
|
||||||
// If you use a \r character, you can remove your name
|
// If you use a \r character, you can remove your name
|
||||||
// from before the text and then pretend to be someone else!
|
// from before the text and then pretend to be someone else!
|
||||||
|
// If you use a \n character, you can create a new line in
|
||||||
|
// the log and then pretend to be someone else as well!
|
||||||
ptr = msg;
|
ptr = msg;
|
||||||
while (*ptr != '\0')
|
while (*ptr != '\0')
|
||||||
{
|
{
|
||||||
if (*ptr == '\r')
|
if (*ptr == '\r' || *ptr == '\n')
|
||||||
*ptr = ' ';
|
*ptr = ' ';
|
||||||
|
|
||||||
ptr++;
|
ptr++;
|
||||||
|
|
Loading…
Reference in a new issue