mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-16 01:54:52 -04:00
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:
parent
3f4c1a1baf
commit
17d87617c8
1 changed files with 55 additions and 55 deletions
|
@ -165,15 +165,15 @@ template<class ID_CLASS,uint32_t TLV_TYPE> class t_RsTlvIdSet: public RsTlvItem
|
||||||
/* skip the header */
|
/* skip the header */
|
||||||
(*offset) += TLV_HEADER_SIZE;
|
(*offset) += TLV_HEADER_SIZE;
|
||||||
|
|
||||||
while(*offset + ID_CLASS::SIZE_IN_BYTES < tlvend)
|
while(*offset + ID_CLASS::SIZE_IN_BYTES <= tlvend)
|
||||||
{
|
{
|
||||||
ID_CLASS id ;
|
ID_CLASS id ;
|
||||||
ok = ok && id.deserialise(data,size,*offset) ;
|
ok = ok && id.deserialise(data,size,*offset) ;
|
||||||
ids.push_back(id) ;
|
ids.push_back(id) ;
|
||||||
}
|
}
|
||||||
if(*offset != tlvsize)
|
if(*offset != tlvend)
|
||||||
std::cerr << "(EE) deserialisaiton error in " << __PRETTY_FUNCTION__ << std::endl;
|
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)
|
virtual std::ostream &print(std::ostream &out, uint16_t indent)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue