Fix ProcessUpdateEntsMsg crashing when ents is empty
This commit is contained in:
parent
6341db8ff0
commit
1c136bcc74
@ -183,6 +183,9 @@ bool game::view::WorldView::ProcessUpdateEntsMsg(net::InMessage& msg)
|
|||||||
if (!msg.Read(count))
|
if (!msg.Read(count))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (count > ents_.size())
|
||||||
|
return false; // wanna update more than we have
|
||||||
|
|
||||||
net::EntNum current = 0;
|
net::EntNum current = 0;
|
||||||
auto it = ents_.begin();
|
auto it = ents_.begin();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user