From c4ef42009c19c4eee0e895d55ac9863840763fa0 Mon Sep 17 00:00:00 2001 From: SNMetamorph <25657591+SNMetamorph@users.noreply.github.com> Date: Fri, 30 Jul 2021 23:53:52 +0400 Subject: [PATCH] engine: client: fixed height argument writing in Con_DrawStringLen --- engine/client/console.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/engine/client/console.c b/engine/client/console.c index f6cefed2..1d6ef09b 100644 --- a/engine/client/console.c +++ b/engine/client/console.c @@ -990,11 +990,14 @@ void GAME_EXPORT Con_DrawStringLen( const char *pText, int *length, int *height { int curLength = 0; - if( !length ) return; - *length = 0; + if( !con.curFont ) + return; + if( height ) + *height = con.curFont->charHeight; + if (!length) + return; - if( !con.curFont ) return; - if( height ) *height = con.curFont->charHeight; + *length = 0; while( *pText ) {