mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 20:50:58 +00:00
Fix command not running if it was split by COM_BufAddText
(Looks at 4865a190578b900b48571e74e0bd97bef88ea71b...)
This commit is contained in:
parent
ab410652ae
commit
ff47f911dc
1 changed files with 10 additions and 9 deletions
|
@ -427,20 +427,21 @@ static void COM_TokenizeString(char *ptext)
|
||||||
|
|
||||||
com_argc = 0;
|
com_argc = 0;
|
||||||
com_args = NULL;
|
com_args = NULL;
|
||||||
|
com_flags = 0;
|
||||||
if (ptext[0] == '\033')
|
|
||||||
{
|
|
||||||
com_flags = (unsigned)ptext[1];
|
|
||||||
ptext += 2;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
com_flags = 0;
|
|
||||||
|
|
||||||
while (com_argc < MAX_ARGS)
|
while (com_argc < MAX_ARGS)
|
||||||
{
|
{
|
||||||
// Skip whitespace up to a newline.
|
// Skip whitespace up to a newline.
|
||||||
while (*ptext != '\0' && *ptext <= ' ' && *ptext != '\n')
|
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,
|
// A newline means end of command in buffer,
|
||||||
// thus end of this command's args too.
|
// thus end of this command's args too.
|
||||||
|
|
Loading…
Reference in a new issue