mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix (harmless) array OOB access when no pings were cached
Use `vector.data()` instead of `&vector[0]` to get access to the underlying array. Fixes #3850.
This commit is contained in:
parent
5ef6544491
commit
039f2c6823
|
@ -197,7 +197,7 @@ void CServerBrowserPingCache::GetPingCache(const CEntry **ppEntries, int *pNumEn
|
|||
}
|
||||
m_aNewEntries.clear();
|
||||
}
|
||||
*ppEntries = &m_aEntries[0];
|
||||
*ppEntries = m_aEntries.data();
|
||||
*pNumEntries = m_aEntries.size();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue