fixed a possible crash in the client console

This commit is contained in:
oy 2010-06-21 13:45:30 +02:00
parent 3475d2ae1b
commit c40bc9af3e

View file

@ -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;