@@ -416,7 +416,7 @@ class CCC_KickPlayerByID : public IConsole_Command
416416 else
417417 {
418418 u32 tmp_client_id;
419- if (sscanf_s (args, " %u" , &tmp_client_id) != 1 )
419+ if (sscanf (args, " %u" , &tmp_client_id) != 1 )
420420 {
421421 Msg (" ! ERROR: bad command parameters." );
422422 Msg (" Kick player. Format: \" sv_kick_id <player session id | \' %s\' >\" . To receive list of players ids "
@@ -508,7 +508,7 @@ class CCC_MakeScreenshot : public IConsole_Command
508508 else
509509 {
510510 u32 tmp_client_id;
511- if (sscanf_s (args_, " %u" , &tmp_client_id) != 1 )
511+ if (sscanf (args_, " %u" , &tmp_client_id) != 1 )
512512 {
513513 Msg (" ! ERROR: bad command parameters." );
514514 Msg (" Make screenshot. Format: \" make_screenshot <player session id | \' %s\' > <ban_time_in_sec>\" . To "
@@ -556,7 +556,7 @@ class CCC_MakeConfigDump : public IConsole_Command
556556 else
557557 {
558558 u32 tmp_client_id;
559- if (sscanf_s (args_, " %u" , &tmp_client_id) != 1 )
559+ if (sscanf (args_, " %u" , &tmp_client_id) != 1 )
560560 {
561561 Msg (" ! ERROR: bad command parameters." );
562562 Msg (" Make screenshot. Format: \" make_config_dump <player session id | \' %s\' > <ban_time_in_sec>\" . To "
@@ -615,7 +615,7 @@ class DemoPlayControlArgParser
615615 string32 param_name;
616616 param_name[0 ] = 0 ;
617617
618- sscanf_s (args_string, " %16s %32s" , action_name, sizeof (action_name), param_name, sizeof (param_name) );
618+ sscanf (args_string, " %16s %32s" , action_name, param_name);
619619 m_action_param = param_name;
620620
621621 if (!xr_strcmp (action_name, " roundstart" ))
@@ -908,7 +908,7 @@ class CCC_BanPlayerByCDKEY : public IConsole_Command
908908 if (!strncmp (args_, LAST_PRINTED_PLAYER_STR, sizeof (LAST_PRINTED_PLAYER_STR) - 1 ))
909909 {
910910 client_id = last_printed_player;
911- if (sscanf_s (args_ + sizeof (LAST_PRINTED_PLAYER_STR), " %d" , &ban_time) != 1 )
911+ if (sscanf (args_ + sizeof (LAST_PRINTED_PLAYER_STR), " %d" , &ban_time) != 1 )
912912 {
913913 Msg (" ! ERROR: bad command parameters." );
914914 Msg (" Ban player. Format: \" sv_banplayer <player session id | \' %s\' > <ban_time_in_sec>\" . To receive "
@@ -921,7 +921,7 @@ class CCC_BanPlayerByCDKEY : public IConsole_Command
921921 else
922922 {
923923 u32 tmp_client_id;
924- if (sscanf_s (args_, " %u %d" , &tmp_client_id, &ban_time) != 2 )
924+ if (sscanf (args_, " %u %d" , &tmp_client_id, &ban_time) != 2 )
925925 {
926926 Msg (" ! ERROR: bad command parameters." );
927927 Msg (" Ban player. Format: \" sv_banplayer <player session id | \' %s\' > <ban_time_in_sec>\" . To receive "
@@ -970,7 +970,7 @@ class CCC_BanPlayerByCDKEYDirectly : public IConsole_Command
970970
971971 char hex_digest[64 ];
972972 s32 ban_time = 0 ;
973- if (sscanf_s (args_, " %s %i" , &hex_digest, sizeof (hex_digest) , &ban_time) != 2 )
973+ if (sscanf (args_, " %s %i" , &hex_digest, &ban_time) != 2 )
974974 {
975975 Msg (" ! ERROR: bad command parameters." );
976976 Msg (" Ban player. Format: \" sv_banplayer_by_digest <hex digest> <ban_time_in_sec>\" . To get player hex "
@@ -1012,7 +1012,7 @@ class CCC_UnBanPlayerByIndex : public IConsole_Command
10121012 {
10131013 // size_t ????? u32 maybe?
10141014 size_t player_index = 0 ;
1015- if (sscanf_s (args_, " %u" , &player_index) != 1 )
1015+ if (sscanf (args_, " %u" , &player_index) != 1 )
10161016 {
10171017 Msg (" ! ERROR: bad command parameters." );
10181018 Msg (" Unban player. Format: \" sv_unbanplayer <banned player index | \' %s\' >. To receive list of banned "
@@ -1226,7 +1226,7 @@ class CCC_ListPlayers : public IConsole_Command
12261226 exclude_raid_from_args (args, tmp_dest, sizeof (tmp_dest));
12271227 if (xr_strlen (tmp_dest))
12281228 {
1229- sscanf_s (tmp_dest, " %s" , filter_string, sizeof (filter_string) );
1229+ sscanf (tmp_dest, " %s" , filter_string);
12301230 tmp_functor.filter_string = filter_string;
12311231 }
12321232 }
@@ -1323,7 +1323,7 @@ class CCC_ListPlayers_Banned : public IConsole_Command
13231323 exclude_raid_from_args (args, tmp_dest, sizeof (tmp_dest));
13241324 if (xr_strlen (tmp_dest))
13251325 {
1326- sscanf_s (tmp_dest, " %s" , filter_dest, sizeof (filter_dest) );
1326+ sscanf (tmp_dest, " %s" , filter_dest);
13271327 }
13281328 tmp_sv_game->PrintBanList (filter_dest);
13291329 Level ().Server ->Print_Banned_Addreses ();
@@ -1356,8 +1356,7 @@ class CCC_ChangeLevelGameType : public IConsole_Command
13561356 string256 GameType;
13571357 GameType[0 ] = 0 ;
13581358
1359- sscanf_s (args, " %255s %255s %255s" , LevelName, sizeof (LevelName), LevelVersion, sizeof (LevelVersion), GameType,
1360- sizeof (GameType));
1359+ sscanf (args, " %255s %255s %255s" , LevelName, LevelVersion, GameType);
13611360
13621361 EGameIDs GameTypeID = ParseStringToGameType (GameType);
13631362 if (GameTypeID == eGameIDNoGame)
@@ -1450,7 +1449,7 @@ class CCC_ChangeLevel : public CCC_ChangeLevelGameType
14501449 string256 LevelVersion;
14511450 LevelName[0 ] = 0 ;
14521451 LevelVersion[0 ] = 0 ;
1453- sscanf_s (args, " %255s %255s" , LevelName, sizeof (LevelName), LevelVersion, sizeof (LevelVersion) );
1452+ sscanf (args, " %255s %255s" , LevelName, LevelVersion);
14541453
14551454 string1024 argsNew;
14561455 xr_sprintf (argsNew, " %s %s %s" , LevelName, LevelVersion, Level ().Server ->GetGameState ()->type_name ());
0 commit comments