forked from 0ad/0ad
Off-by-one bug in the CEntityList Serialize method; was storing the last entity twice
This was SVN commit r2320.
This commit is contained in:
parent
f1e9bf6227
commit
f61a5d1c25
@ -137,7 +137,7 @@ uint CEntityList::GetSerializedLength() const
|
|||||||
|
|
||||||
u8 *CEntityList::Serialize(u8 *buffer) const
|
u8 *CEntityList::Serialize(u8 *buffer) const
|
||||||
{
|
{
|
||||||
for (size_t i=0;i<size();i++)
|
for (size_t i=0;i<(size()-1);i++)
|
||||||
Serialize_int_2(buffer, at(i).m_handle);
|
Serialize_int_2(buffer, at(i).m_handle);
|
||||||
Serialize_int_2(buffer, back().m_handle | HANDLE_SENTINEL_BIT);
|
Serialize_int_2(buffer, back().m_handle | HANDLE_SENTINEL_BIT);
|
||||||
return buffer;
|
return buffer;
|
||||||
|
Loading…
Reference in New Issue
Block a user