fixed bug in serialization of data chunks

This commit is contained in:
csoler 2017-04-16 20:11:54 +02:00
parent 121133488c
commit 2ca46ec636

View File

@ -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 ;