Fix bug in JSON t_RsFlags32 deserialization

If the member was not present in the JSON it was zeroed while it should
be left untouched in that case.
This was discovered because in JSON API defualt argument value for
methods wasn't onored for t_RsFlags32 arguments.
This commit is contained in:
Gioacchino Mazzurco 2018-10-09 22:43:15 +02:00
parent 205743e0ff
commit 2139090f5d
No known key found for this signature in database
GPG Key ID: A1FBCA3872E87051

View File

@ -658,8 +658,8 @@ struct RsTypeSerializer
uint32_t f = 0;
ctx.mOk &=
(ctx.mOk || ctx.mFlags & RsGenericSerializer::SERIALIZATION_FLAG_YIELDING)
&& from_JSON(memberName, f, ctx.mJson);
v = t_RsFlags32<N>(f);
&& from_JSON(memberName, f, ctx.mJson)
&& (v = t_RsFlags32<N>(f), true);
break;
}
default: break;