mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-23 12:32:09 +00:00
01bfb1540f
This function is used in the Team Arena menus I don't think it's actually possible to reach this line with foundPlayerServerNames < 1, because by the time we get here we have set it to 1 + the actual number of servers; but if we did, it would clearly underflow into foundPlayerServerNames[-1], which would be undefined behaviour. gcc 6 diagnoses this with a warning: code/ui/ui_main.c: In function ‘UI_BuildFindPlayerList’: code/ui/ui_main.c:4138:16: warning: array subscript is below array bounds [-Warray-bounds] Also correct the sizeof() invocation to make it more obviously correct (in fact the buffers for names and addresses happen to both be of size MAX_ADDRESSLENGTH, so it was fine, but it's good to be obvious). |
||
---|---|---|
.. | ||
AL | ||
asm | ||
botlib | ||
cgame | ||
client | ||
game | ||
jpeg-8c | ||
libcurl-7.35.0/curl | ||
libogg-1.3.1 | ||
libs | ||
libspeex | ||
libvorbis-1.3.4 | ||
null | ||
opus-1.1 | ||
opusfile-0.5 | ||
q3_ui | ||
qcommon | ||
renderercommon | ||
renderergl1 | ||
renderergl2 | ||
sdl | ||
SDL2/include | ||
server | ||
sys | ||
tools | ||
ui | ||
zlib |