From 7299be8cb85e714055f9d190204ecefb73b7d037 Mon Sep 17 00:00:00 2001 From: Aure7138 <100095051+Aure7138@users.noreply.github.com> Date: Tue, 12 Dec 2023 16:50:52 +0800 Subject: [PATCH] fix(player_command): memory leak (#2504) --- src/backend/player_command.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backend/player_command.cpp b/src/backend/player_command.cpp index 5859bbda..7d7054d9 100644 --- a/src/backend/player_command.cpp +++ b/src/backend/player_command.cpp @@ -92,6 +92,7 @@ namespace big result.push(plyr_id); } + new_args.reserve(args.size() - 1); std::copy(++args.begin(), args.end(), new_args.begin()); // for (int i = 1; i < args.size(); i++) // new_args.push_back(args[i]);