mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-26 15:28:28 -05:00
fixed bug in serialization of data chunks
This commit is contained in:
parent
121133488c
commit
2ca46ec636
@ -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…
x
Reference in New Issue
Block a user