mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #3142
3142: Fix two more serverbrowser filter out of bounds r=def- a=Jupeyy Co-authored-by: Jupeyy <jupjopjap@gmail.com>
This commit is contained in:
commit
c04621ea43
|
@ -219,7 +219,7 @@ void CServerBrowser::Filter()
|
||||||
{
|
{
|
||||||
Filtered = 1;
|
Filtered = 1;
|
||||||
// match against player country
|
// match against player country
|
||||||
for(p = 0; p < m_ppServerlist[i]->m_Info.m_NumClients; p++)
|
for(p = 0; p < minimum(m_ppServerlist[i]->m_Info.m_NumClients, (int)MAX_CLIENTS); p++)
|
||||||
{
|
{
|
||||||
if(m_ppServerlist[i]->m_Info.m_aClients[p].m_Country == g_Config.m_BrFilterCountryIndex)
|
if(m_ppServerlist[i]->m_Info.m_aClients[p].m_Country == g_Config.m_BrFilterCountryIndex)
|
||||||
{
|
{
|
||||||
|
@ -243,7 +243,7 @@ void CServerBrowser::Filter()
|
||||||
}
|
}
|
||||||
|
|
||||||
// match against players
|
// match against players
|
||||||
for(p = 0; p < m_ppServerlist[i]->m_Info.m_NumClients; p++)
|
for(p = 0; p < minimum(m_ppServerlist[i]->m_Info.m_NumClients, (int)MAX_CLIENTS); p++)
|
||||||
{
|
{
|
||||||
if(str_find_nocase(m_ppServerlist[i]->m_Info.m_aClients[p].m_aName, g_Config.m_BrFilterString) ||
|
if(str_find_nocase(m_ppServerlist[i]->m_Info.m_aClients[p].m_aName, g_Config.m_BrFilterString) ||
|
||||||
str_find_nocase(m_ppServerlist[i]->m_Info.m_aClients[p].m_aClan, g_Config.m_BrFilterString))
|
str_find_nocase(m_ppServerlist[i]->m_Info.m_aClients[p].m_aClan, g_Config.m_BrFilterString))
|
||||||
|
|
Loading…
Reference in a new issue