mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-13 16:39:43 -05:00
Fix regression in sequence container FROM_JSON
This commit is contained in:
parent
fc5ad40c90
commit
d666e58403
@ -567,31 +567,29 @@ struct RsTypeSerializer
|
||||
arrKey.SetString( memberName.c_str(),
|
||||
static_cast<SizeType>(memberName.length()) );
|
||||
|
||||
ok = ok && jDoc.IsObject();
|
||||
ok = ok && jDoc.HasMember(arrKey);
|
||||
ok = ok && jDoc.IsObject() && jDoc.HasMember(arrKey)
|
||||
&& jDoc[arrKey].IsArray();
|
||||
if(!ok) { ctx.mOk = false; break; }
|
||||
|
||||
if(ok && jDoc[arrKey].IsArray())
|
||||
for (auto&& arrEl : jDoc[arrKey].GetArray())
|
||||
{
|
||||
for (auto&& arrEl : jDoc[arrKey].GetArray())
|
||||
{
|
||||
Value arrKeyT;
|
||||
arrKeyT.SetString(
|
||||
memberName.c_str(),
|
||||
static_cast<SizeType>(memberName.length()) );
|
||||
Value arrKeyT;
|
||||
arrKeyT.SetString(
|
||||
memberName.c_str(),
|
||||
static_cast<SizeType>(memberName.length()) );
|
||||
|
||||
RsGenericSerializer::SerializeContext elCtx(
|
||||
nullptr, 0, ctx.mFlags, &allocator );
|
||||
elCtx.mJson.AddMember(arrKeyT, arrEl, allocator);
|
||||
RsGenericSerializer::SerializeContext elCtx(
|
||||
nullptr, 0, ctx.mFlags, &allocator );
|
||||
elCtx.mJson.AddMember(arrKeyT, arrEl, allocator);
|
||||
|
||||
el_t el;
|
||||
serial_process(j, elCtx, el, "");
|
||||
ok = ok && elCtx.mOk;
|
||||
ctx.mOk &= ok;
|
||||
if(ok) member.insert(member.end(), el);
|
||||
else break;
|
||||
}
|
||||
el_t el;
|
||||
serial_process(j, elCtx, el, memberName);
|
||||
ok = ok && elCtx.mOk;
|
||||
ctx.mOk &= ok;
|
||||
if(ok) member.insert(member.end(), el);
|
||||
else break;
|
||||
}
|
||||
else ctx.mOk = false;
|
||||
|
||||
break;
|
||||
}
|
||||
default: fatalUnknownSerialJob(j);
|
||||
|
Loading…
Reference in New Issue
Block a user