From 052e0445abddd9d1e80d6533827738cbb71d31ac Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Wed, 15 May 2024 03:08:22 +0300 Subject: [PATCH] engine: client: console: cleanup input buffer from line feed characters before pushing it to the console history --- engine/client/console.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/client/console.c b/engine/client/console.c index 6fd6312a..5396fb1d 100644 --- a/engine/client/console.c +++ b/engine/client/console.c @@ -1549,6 +1549,9 @@ void Key_Console( int key ) Con_Printf( ">%s\n", con.input.buffer ); // copy line to history buffer + // just in case, remove all CR and LF characters pushing it to the history + // not sure how they get even added in the first place + COM_RemoveLineFeed( con.input.buffer, sizeof( con.input.buffer )); Con_HistoryAppend( &con.history, &con.input ); Con_ClearField( &con.input );