diff --git a/Telegram/SourceFiles/ui/emoji_config.h b/Telegram/SourceFiles/ui/emoji_config.h index 955811f11c..a863a51fac 100644 --- a/Telegram/SourceFiles/ui/emoji_config.h +++ b/Telegram/SourceFiles/ui/emoji_config.h @@ -173,7 +173,7 @@ inline void appendPartToResult(QString &result, const QChar *start, const QChar if (entity.offset() >= from - start) { entity.extendToLeft(from - start - result.size()); } - if (entity.offset() + entity.length() < to - start) { + if (entity.offset() + entity.length() <= to - start) { entity.shrinkFromRight(from - start - result.size()); } }