diff --git a/td/telegram/PollManager.cpp b/td/telegram/PollManager.cpp index 3e788188..bb50e284 100644 --- a/td/telegram/PollManager.cpp +++ b/td/telegram/PollManager.cpp @@ -1263,13 +1263,15 @@ PollId PollManager::on_get_poll(PollId poll_id, tl_object_ptrflags_ & telegram_api::pollAnswerVoters::CORRECT_MASK) != 0; - if (is_correct) { - if (correct_option_id != -1) { - LOG(ERROR) << "Receive more than 1 correct answers " << correct_option_id << " and " << i; + bool is_correct = (poll_result->flags_ & telegram_api::pollAnswerVoters::CORRECT_MASK) != 0; + if (is_correct) { + if (correct_option_id != -1) { + LOG(ERROR) << "Receive more than 1 correct answers " << correct_option_id << " and " << i; + } + correct_option_id = static_cast(i); } - correct_option_id = static_cast(i); + } else { + correct_option_id = poll->correct_option_id; } if (poll_result->voters_ < 0) {