From 07f1f7ded11980d256c19357392d01d2dd4beb14 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Fri, 3 Dec 2021 09:41:58 +0300 Subject: [PATCH] engine: launcher: use our Q_strncpy instead of standard strncpy --- engine/common/launcher.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/engine/common/launcher.c b/engine/common/launcher.c index 08fedf6b..7f85ff06 100644 --- a/engine/common/launcher.c +++ b/engine/common/launcher.c @@ -15,8 +15,6 @@ GNU General Public License for more details. #ifdef SINGLE_BINARY -#include -#include #include "build.h" #include "common.h" #ifdef XASH_SDLMAIN @@ -37,7 +35,7 @@ static char **g_pszArgv; void Launcher_ChangeGame( const char *progname ) { - strncpy( szGameDir, progname, sizeof( szGameDir ) - 1 ); + Q_strncpy( szGameDir, progname, sizeof( szGameDir ) - 1 ); Host_Shutdown( ); exit( Host_Main( g_iArgc, g_pszArgv, szGameDir, 1, &Launcher_ChangeGame ) ); } @@ -81,7 +79,7 @@ int main( int argc, char** argv ) } else { - strncpy( gamedir_buf, gamedir, 32 ); + Q_strncpy( gamedir_buf, gamedir, 32 ); gamedir = gamedir_buf; }