Don't check requested emoji size.
This commit is contained in:
parent
288bec7157
commit
39d440f774
1 changed files with 0 additions and 3 deletions
|
|
@ -20,7 +20,6 @@ class QPainter;
|
||||||
namespace Ui::CustomEmoji {
|
namespace Ui::CustomEmoji {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
constexpr auto kMaxSize = 128;
|
|
||||||
constexpr auto kMaxFrames = 180;
|
constexpr auto kMaxFrames = 180;
|
||||||
constexpr auto kCacheVersion = 1;
|
constexpr auto kCacheVersion = 1;
|
||||||
constexpr auto kPreloadFrames = 3;
|
constexpr auto kPreloadFrames = 3;
|
||||||
|
|
@ -169,8 +168,6 @@ Cache::Cache(int size) : _size(size) {
|
||||||
std::optional<Cache> Cache::FromSerialized(
|
std::optional<Cache> Cache::FromSerialized(
|
||||||
const QByteArray &serialized,
|
const QByteArray &serialized,
|
||||||
int requestedSize) {
|
int requestedSize) {
|
||||||
Expects(requestedSize > 0 && requestedSize <= kMaxSize);
|
|
||||||
|
|
||||||
if (serialized.size() <= sizeof(CacheHeader)) {
|
if (serialized.size() <= sizeof(CacheHeader)) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue