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:
heinrich5991 2021-05-27 15:53:40 +02:00
parent 5ef6544491
commit 039f2c6823

View file

@ -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();
}