From 510f82d908677492ad3603a1cde62a436f0e8339 Mon Sep 17 00:00:00 2001 From: Eric Zhang Date: Mon, 9 Nov 2026 00:36:09 +0800 Subject: [PATCH] Remove size parameter from AttemptNominate (#2601) --- plugins/nominations.sp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/nominations.sp b/plugins/nominations.sp index a3034698..9d13ab52 100644 --- a/plugins/nominations.sp +++ b/plugins/nominations.sp @@ -218,14 +218,14 @@ public Action Command_Nominate(int client, int args) { // Get the result and nominate it g_MapList.GetString(results.Get(0), mapResult, sizeof(mapResult)); - AttemptNominate(client, mapResult, sizeof(mapResult)); + AttemptNominate(client, mapResult); } else if (matches > 1) { if (source == SM_REPLY_TO_CONSOLE) { // if source is console, attempt instead of displaying menu. - AttemptNominate(client, mapname, sizeof(mapname)); + AttemptNominate(client, mapname); delete results; return Plugin_Handled; } @@ -284,10 +284,10 @@ int FindMatchingMaps(ArrayList mapList, ArrayList results, const char[] input) return matches; } -void AttemptNominate(int client, const char[] map, int size) +void AttemptNominate(int client, const char[] map) { char mapname[PLATFORM_MAX_PATH]; - if (FindMap(map, mapname, size) == FindMap_NotFound) + if (FindMap(map, mapname, sizeof(mapname)) == FindMap_NotFound) { // We couldn't resolve the map entry to a filename, so... ReplyToCommand(client, "%t", "Map was not found", mapname); @@ -432,7 +432,7 @@ public int MenuHandler_MapSelect(Menu menu, MenuAction action, int param1, int p char mapname[PLATFORM_MAX_PATH]; // Get the map name and attempt to nominate it menu.GetItem(param2, mapname, sizeof(mapname)); - AttemptNominate(param1, mapname, sizeof(mapname)); + AttemptNominate(param1, mapname); } case MenuAction_DrawItem: {