From e1fd43b2a49a48a2dec6d8dbc9771eef139ce94a Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 10 Jul 2018 11:12:58 +0300 Subject: [PATCH] Fix crash in text post processing. Fixes #4948. --- Telegram/SourceFiles/ui/widgets/input_fields.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Telegram/SourceFiles/ui/widgets/input_fields.cpp b/Telegram/SourceFiles/ui/widgets/input_fields.cpp index 8fddd7afe9..cd6e4f5476 100644 --- a/Telegram/SourceFiles/ui/widgets/input_fields.cpp +++ b/Telegram/SourceFiles/ui/widgets/input_fields.cpp @@ -1987,7 +1987,6 @@ void InputField::processFormatting(int insertPosition, int insertEnd) { if (ch + 1 < textEnd && ch->isHighSurrogate() && (ch + 1)->isLowSurrogate()) { ++ch; - ++fragmentPosition; } } if (action.type != ActionType::Invalid) {