bugfix in serialisation of tlvIdsSet

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-IdCleaning@7144 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2014-02-22 20:39:25 +00:00
parent 3f4c1a1baf
commit 17d87617c8

View file

@ -165,15 +165,15 @@ template<class ID_CLASS,uint32_t TLV_TYPE> class t_RsTlvIdSet: public RsTlvItem
/* skip the header */
(*offset) += TLV_HEADER_SIZE;
while(*offset + ID_CLASS::SIZE_IN_BYTES < tlvend)
while(*offset + ID_CLASS::SIZE_IN_BYTES <= tlvend)
{
ID_CLASS id ;
ok = ok && id.deserialise(data,size,*offset) ;
ids.push_back(id) ;
}
if(*offset != tlvsize)
if(*offset != tlvend)
std::cerr << "(EE) deserialisaiton error in " << __PRETTY_FUNCTION__ << std::endl;
return *offset == tlvsize ;
return *offset == tlvend ;
}
virtual std::ostream &print(std::ostream &out, uint16_t indent)
{