We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed96941 commit c823baeCopy full SHA for c823bae
lib/email/mjson.cpp
@@ -179,7 +179,10 @@ BOOL MJSON::load_from_json(const Json::Value &root) try
179
pjson->flag = root["flag"].asBool();
180
pjson->priority = root["priority"].asUInt();
181
pjson->ref = base64_decode(root["ref"].asString());
182
- if (!mjson_parse_array(pjson, root["structure"], TYPE_STRUCTURE) ||
+ if (root.isMember("structure") &&
183
+ !mjson_parse_array(pjson, root["structure"], TYPE_STRUCTURE))
184
+ return false;
185
+ if (root.isMember("mimes") &&
186
!mjson_parse_array(pjson, root["mimes"], TYPE_MIMES))
187
return false;
188
pjson->size = root["size"].asUInt();
0 commit comments