From 2f85997c9f085b58e4a7272fe330968e8f3d8bfb Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 9 Feb 2017 16:53:28 +0300 Subject: [PATCH] Fixed multiline comments handling in theme editor. #2987 --- .../SourceFiles/window/themes/window_theme_editor.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/window/themes/window_theme_editor.cpp b/Telegram/SourceFiles/window/themes/window_theme_editor.cpp index bc95e3b055..d6ad3111c9 100644 --- a/Telegram/SourceFiles/window/themes/window_theme_editor.cpp +++ b/Telegram/SourceFiles/window/themes/window_theme_editor.cpp @@ -102,8 +102,14 @@ bool skipComment(const char *&data, const char *end) { while (data != end && *data != '*') { ++data; } - if (data != end) ++data; - if (data == end || *data == '/') { + if (data != end) { + ++data; + if (data != end && *data == '/') { + ++data; + break; + } + } + if (data == end) { break; } }