summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElzorFox <elzorfox@ya.ru>2017-09-02 12:55:49 +0500
committerElzorFox <elzorfox@ya.ru>2017-09-02 12:55:49 +0500
commit2b409bafd5f1310481d1211f8267028078ac283b (patch)
tree21765fe4f883489739f1eeefab33f08e4bcac3b2
parent356f54efece1ecb86ccf32c8dcc08c445b719661 (diff)
VKontakte: fix parsing telephone digits in capcha
-rw-r--r--protocols/VKontakte/src/misc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 088a8b4e71..5232e13b85 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -442,9 +442,9 @@ bool CVkProto::AutoFillForm(char *pBody, CMStringA &szAction, CMStringA& szResul
char szPrefixTel[10], szSufixTel[10];
CMStringW wszTitle;
char *pPhonePref = strstr(pFormBeg, "<span class=\"field_prefix\">");
- if (pPhonePref && sscanf(pPhonePref, "<span class=\"field_prefix\">%s</span>", szPrefixTel) == 1) {
+ if (pPhonePref && sscanf(pPhonePref, "<span class=\"field_prefix\">%[^<]", szPrefixTel) == 1) {
pPhonePref = strstr(pPhonePref + 1, "<span class=\"field_prefix\">&nbsp;");
- if (pPhonePref && sscanf(pPhonePref, "<span class=\"field_prefix\">&nbsp;%s</span>", szSufixTel) == 1) {
+ if (pPhonePref && sscanf(pPhonePref, "<span class=\"field_prefix\">&nbsp;%[^<]", szSufixTel) == 1) {
wszTitle.Format(TranslateT("Enter the missing digits between %s and %s of the phone number linked to your account"), ptrW(mir_a2u(szPrefixTel)), ptrW(mir_a2u(szSufixTel)));
MessageBoxW(NULL, wszTitle, TranslateT("Attention!"), MB_ICONWARNING | MB_OK);
}