mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r7984) -Fix: out-of-bounds read access on _clients array (Quark)
This commit is contained in:
parent
48b4226f5e
commit
5acbc88ee1
@ -81,7 +81,7 @@ NetworkClientState *NetworkFindClientStateFromIndex(uint16 client_index)
|
|||||||
{
|
{
|
||||||
NetworkClientState *cs;
|
NetworkClientState *cs;
|
||||||
|
|
||||||
for (cs = _clients; cs != &_clients[MAX_CLIENT_INFO]; cs++) {
|
for (cs = _clients; cs != endof(_clients); cs++) {
|
||||||
if (cs->index == client_index) return cs;
|
if (cs->index == client_index) return cs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user