From f1a133acf10cab123518e39478875f22b6e91f85 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sun, 25 Sep 2016 16:59:12 +0100 Subject: [PATCH] UI_BuildFindPlayerList: make a sizeof() more obviously correct As with the other branch of the if/else, each element of foundPlayerServerNames is in fact the same size as each element of foundPlayerServerAddresses, so it was fine; but it's better to make it obvious that we are using the right array sizes. --- code/ui/ui_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ui/ui_main.c b/code/ui/ui_main.c index 044c00ff..e9e36ea9 100644 --- a/code/ui/ui_main.c +++ b/code/ui/ui_main.c @@ -4138,7 +4138,7 @@ static void UI_BuildFindPlayerList(qboolean force) { Com_sprintf(uiInfo.foundPlayerServerNames[0], sizeof(uiInfo.foundPlayerServerNames[0]), "no servers found"); } else { - Com_sprintf(uiInfo.foundPlayerServerNames[uiInfo.numFoundPlayerServers-1], sizeof(uiInfo.foundPlayerServerAddresses[0]), + Com_sprintf(uiInfo.foundPlayerServerNames[uiInfo.numFoundPlayerServers-1], sizeof(uiInfo.foundPlayerServerNames[0]), "%d server%s found with player %s", uiInfo.numFoundPlayerServers-1, uiInfo.numFoundPlayerServers == 2 ? "":"s", uiInfo.findPlayerName); }