mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 14:45:12 -04:00
fixed bug in serialization of data chunks
This commit is contained in:
parent
121133488c
commit
2ca46ec636
1 changed files with 2 additions and 0 deletions
|
@ -213,6 +213,7 @@ template<> bool RsTypeSerializer::deserialize(const uint8_t data[],uint32_t size
|
|||
ok = ok && NULL != r.first;
|
||||
|
||||
memcpy(r.first,&data[offset],r.second) ;
|
||||
offset += r.second ;
|
||||
|
||||
if(!ok)
|
||||
offset = saved_offset ;
|
||||
|
@ -227,6 +228,7 @@ template<> bool RsTypeSerializer::serialize(uint8_t data[],uint32_t size,uint32_
|
|||
bool ok = serialize<uint32_t>(data,size,offset,r.second) ;
|
||||
|
||||
memcpy(&data[offset],r.first,r.second) ;
|
||||
offset += r.second ;
|
||||
|
||||
if(!ok)
|
||||
offset = saved_offset ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue