From ba8c67dafed3f2f143ea37a657294f59d3cb4e00 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 17 Mar 2020 19:49:19 +0300 Subject: n-nope, three utf-8 chars do not talke three bytes --- plugins/New_GPG/src/main.cpp | 8 ++++---- plugins/New_GPG/src/messages.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/New_GPG') diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp index a1a6436d14..db51945fa5 100755 --- a/plugins/New_GPG/src/main.cpp +++ b/plugins/New_GPG/src/main.cpp @@ -313,7 +313,7 @@ void ImportKey(MCONTACT hContact, std::wstring new_key) s = output.find("\"", s2); s += 1; } - else s += 3; + else s += sizeof(RUS_QUOTE) - 1; bool uncommon = false; if ((s2 = output.find("(", s)) == string::npos) { @@ -376,8 +376,8 @@ void ImportKey(MCONTACT hContact, std::wstring new_key) s = output.find("\"", s2); s += 1; } - else - s += 3; + else s += sizeof(RUS_QUOTE) - 1; + bool uncommon = false; if ((s2 = output.find("(", s)) == string::npos) { if ((s2 = output.find("<", s)) == string::npos) { @@ -437,7 +437,7 @@ void ImportKey(MCONTACT hContact, std::wstring new_key) s = output.find("\"", s2); s += 1; } - else s += 3; + else s += sizeof(RUS_QUOTE) - 1; bool uncommon = false; if ((s2 = output.find("(", s)) == string::npos) { diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp index 14ba256481..055ce67fa7 100755 --- a/plugins/New_GPG/src/messages.cpp +++ b/plugins/New_GPG/src/messages.cpp @@ -440,7 +440,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l) s1 = output.find("\"", s2); s1 += 1; } - else s1 += 3; + else s1 += sizeof(RUS_QUOTE) - 1; if ((s2 = output.find("(", s1)) == string::npos) s2 = output.find("<", s1); -- cgit v1.2.3