mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix command not running if it was split by COM_BufAddText
(Looks at d57083264e93f1020c2730e072c7a7b5417e08b3...)
This commit is contained in:
parent
46c0d62a06
commit
7d6d8b3b6e
1 changed files with 10 additions and 9 deletions
|
|
@ -427,20 +427,21 @@ static void COM_TokenizeString(char *ptext)
|
|||
|
||||
com_argc = 0;
|
||||
com_args = NULL;
|
||||
|
||||
if (ptext[0] == '\033')
|
||||
{
|
||||
com_flags = (unsigned)ptext[1];
|
||||
ptext += 2;
|
||||
}
|
||||
else
|
||||
com_flags = 0;
|
||||
com_flags = 0;
|
||||
|
||||
while (com_argc < MAX_ARGS)
|
||||
{
|
||||
// Skip whitespace up to a newline.
|
||||
while (*ptext != '\0' && *ptext <= ' ' && *ptext != '\n')
|
||||
ptext++;
|
||||
{
|
||||
if (ptext[0] == '\033')
|
||||
{
|
||||
com_flags = (unsigned)ptext[1];
|
||||
ptext += 2;
|
||||
}
|
||||
else
|
||||
ptext++;
|
||||
}
|
||||
|
||||
// A newline means end of command in buffer,
|
||||
// thus end of this command's args too.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue