diff --git a/code/client/cl_keys.c b/code/client/cl_keys.c index 2fb2c1ca..b2bc9559 100644 --- a/code/client/cl_keys.c +++ b/code/client/cl_keys.c @@ -1478,9 +1478,10 @@ void CL_LoadConsoleHistory( void ) return; } - if( consoleSaveBufferSize <= MAX_CONSOLE_SAVE_BUFFER && + if( consoleSaveBufferSize < MAX_CONSOLE_SAVE_BUFFER && FS_Read( consoleSaveBuffer, consoleSaveBufferSize, f ) == consoleSaveBufferSize ) { + consoleSaveBuffer[consoleSaveBufferSize] = '\0'; text_p = consoleSaveBuffer; for( i = COMMAND_HISTORY - 1; i >= 0; i-- )