From c40bc9af3e51c98afe68e03a45ba83651bfa0ad0 Mon Sep 17 00:00:00 2001 From: oy Date: Mon, 21 Jun 2010 13:45:30 +0200 Subject: fixed a possible crash in the client console --- src/game/client/components/console.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/game/client/components/console.cpp') diff --git a/src/game/client/components/console.cpp b/src/game/client/components/console.cpp index 433ff409..cb8c31ce 100644 --- a/src/game/client/components/console.cpp +++ b/src/game/client/components/console.cpp @@ -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; -- cgit 1.4.1