Skip to content

Commit a3f5a5e

Browse files
committed
Fix parse error
1 parent a547fca commit a3f5a5e

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/TgTypeParser.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -739,8 +739,9 @@ PollAnswer::Ptr TgTypeParser::parseJsonAndGetPollAnswer(const boost::property_tr
739739
auto result(std::make_shared<PollAnswer>());
740740
result->pollId = data.get<std::string>("poll_id", "");
741741
result->user = tryParseJson<User>(&TgTypeParser::parseJsonAndGetUser, data, "user");
742-
result->optionIds = parseJsonAndGetArray<std::int32_t>([] (const boost::property_tree::ptree& innerData)->std::int32_t {
743-
return innerData.get<std::int32_t>(0);
742+
result->optionIds = parseJsonAndGetArray<std::int32_t>(
743+
[] (const boost::property_tree::ptree& innerData)->std::int32_t {
744+
return innerData.get<std::int32_t>("");
744745
}, data, "option_ids");
745746
return result;
746747
}
@@ -3271,8 +3272,9 @@ InputInvoiceMessageContent::Ptr TgTypeParser::parseJsonAndGetInputInvoiceMessage
32713272
result->currency = data.get<std::string>("currency", "");
32723273
result->prices = parseJsonAndGetArray<LabeledPrice>(&TgTypeParser::parseJsonAndGetLabeledPrice, data, "prices");
32733274
result->maxTipAmount = data.get<std::int32_t>("max_tip_amount", 0);
3274-
result->suggestedTipAmounts = parseJsonAndGetArray<std::int32_t>([] (const boost::property_tree::ptree& innerData)->std::int32_t {
3275-
return innerData.get<std::int32_t>(0);
3275+
result->suggestedTipAmounts = parseJsonAndGetArray<std::int32_t>(
3276+
[] (const boost::property_tree::ptree& innerData)->std::int32_t {
3277+
return innerData.get<std::int32_t>("");
32763278
}, data, "suggested_tip_amounts");
32773279
result->providerData = data.get<std::string>("provider_data", "");
32783280
result->photoUrl = data.get<std::string>("photo_url", "");

0 commit comments

Comments
 (0)