From 8fcaf18897e9a3030d9f0608629a577156d7c404 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 8 Aug 2024 04:32:58 +0300 Subject: [PATCH] engine: client: remove useless copy in NetAPI_SendRequest --- engine/client/cl_game.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/engine/client/cl_game.c b/engine/client/cl_game.c index a14dad31..8a8f01ff 100644 --- a/engine/client/cl_game.c +++ b/engine/client/cl_game.c @@ -3437,7 +3437,6 @@ NetAPI_SendRequest static void GAME_EXPORT NetAPI_SendRequest( int context, int request, int flags, double timeout, netadr_t *remote_address, net_api_response_func_t response ) { net_request_t *nr = NULL; - string req; int i; if( !response ) @@ -3489,8 +3488,7 @@ static void GAME_EXPORT NetAPI_SendRequest( int context, int request, int flags, nr->flags = flags; // local servers request - Q_snprintf( req, sizeof( req ), "netinfo %i %i %i", FBitSet( flags, FNETAPI_LEGACY_PROTOCOL ) ? PROTOCOL_LEGACY_VERSION : PROTOCOL_VERSION, context, request ); - Netchan_OutOfBandPrint( NS_CLIENT, nr->resp.remote_address, "%s", req ); + Netchan_OutOfBandPrint( NS_CLIENT, nr->resp.remote_address, "netinfo %i %i %i", FBitSet( flags, FNETAPI_LEGACY_PROTOCOL ) ? PROTOCOL_LEGACY_VERSION : PROTOCOL_VERSION, context, request ); } /*