mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fixed a possible crash in the client console
This commit is contained in:
parent
3475d2ae1b
commit
c40bc9af3e
|
@ -189,7 +189,7 @@ void CGameConsole::CInstance::OnInput(IInput::CEvent Event)
|
|||
char aBuf[64] = {0};
|
||||
const char *pSrc = GetString();
|
||||
int i = 0;
|
||||
for(; i < (int)sizeof(aBuf) && *pSrc && *pSrc != ' ' && *pSrc != ' '; i++, pSrc++)
|
||||
for(; i < (int)sizeof(aBuf)-1 && *pSrc && *pSrc != ' '; i++, pSrc++)
|
||||
aBuf[i] = *pSrc;
|
||||
aBuf[i] = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue