mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-14 00:21:16 +00:00
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.
This commit is contained in:
parent
01bfb1540f
commit
f1a133acf1
1 changed files with 1 additions and 1 deletions
|
@ -4138,7 +4138,7 @@ static void UI_BuildFindPlayerList(qboolean force) {
|
||||||
Com_sprintf(uiInfo.foundPlayerServerNames[0], sizeof(uiInfo.foundPlayerServerNames[0]), "no servers found");
|
Com_sprintf(uiInfo.foundPlayerServerNames[0], sizeof(uiInfo.foundPlayerServerNames[0]), "no servers found");
|
||||||
}
|
}
|
||||||
else {
|
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,
|
"%d server%s found with player %s", uiInfo.numFoundPlayerServers-1,
|
||||||
uiInfo.numFoundPlayerServers == 2 ? "":"s", uiInfo.findPlayerName);
|
uiInfo.numFoundPlayerServers == 2 ? "":"s", uiInfo.findPlayerName);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue