[ioquake3] 07/39: UI_BuildFindPlayerList: make a sizeof() more obviously correct

Simon McVittie smcv at debian.org
Sat Nov 5 20:26:22 UTC 2016


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian/master
in repository ioquake3.

commit f1a133acf10cab123518e39478875f22b6e91f85
Author: Simon McVittie <smcv at debian.org>
Date:   Sun Sep 25 16:59:12 2016 +0100

    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 044c00f..e9e36ea 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);
 		}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ioquake3.git



More information about the Pkg-games-commits mailing list