2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-28 15:45:46 +03:00

Fix no exec config file when exceed limit text buffer

This commit is contained in:
s1lentq 2024-01-12 22:32:15 +07:00
parent 93f5775ac2
commit 32857e7785

View File

@ -235,7 +235,8 @@ void Cbuf_Execute(void)
} }
// execute the command line // execute the command line
Cmd_ExecuteString(line, src_command); if (len > 0)
Cmd_ExecuteString(line, src_command);
if (cmd_wait) if (cmd_wait)
{ {
@ -406,17 +407,12 @@ void Cmd_Exec_f(void)
else else
{ {
char *pszDataPtr = configContents; char *pszDataPtr = configContents;
while (true) while (pszDataPtr && *pszDataPtr)
{ {
Cbuf_Execute(); // TODO: This doesn't obey the rule to first execute commands from the file, and then the others in the buffer Cbuf_Execute(); // TODO: This doesn't obey the rule to first execute commands from the file, and then the others in the buffer
pszDataPtr = COM_ParseLine(pszDataPtr); // TODO: COM_ParseLine can be const char* pszDataPtr = COM_ParseLine(pszDataPtr); // TODO: COM_ParseLine can be const char*
if (com_token[0])
if (com_token[0] == 0) Cbuf_InsertTextLines(com_token);
{
break;
}
Cbuf_InsertTextLines(com_token);
} }
} }