Fix minithumbnail dimensions.

GitOrigin-RevId: cd854007a759af2ef7a6ab71c45e5c9ed020d2f5
This commit is contained in:
levlam 2019-11-13 23:00:49 +03:00
parent 0044ce9bd3
commit afca63a4f4

View File

@ -86,8 +86,8 @@ td_api::object_ptr<td_api::minithumbnail> get_minithumbnail_object(const string
.move_as_ok();
static const string footer = base64_decode("/9k=").move_as_ok();
auto result = td_api::make_object<td_api::minithumbnail>();
result->width_ = static_cast<unsigned char>(packed[1]);
result->height_ = static_cast<unsigned char>(packed[2]);
result->height_ = static_cast<unsigned char>(packed[1]);
result->width_ = static_cast<unsigned char>(packed[2]);
result->data_ = PSTRING() << header.substr(0, 164) << packed[1] << header[165] << packed[2] << header.substr(167)
<< packed.substr(3) << footer;
return result;