summaryrefslogtreecommitdiff
path: root/protocols/Skype
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Skype')
-rw-r--r--protocols/Skype/src/skype_dialogs.cpp5
-rw-r--r--protocols/Skype/src/skype_own_info.cpp10
2 files changed, 8 insertions, 7 deletions
diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp
index 1fd0d44191..feb92db25c 100644
--- a/protocols/Skype/src/skype_dialogs.cpp
+++ b/protocols/Skype/src/skype_dialogs.cpp
@@ -451,7 +451,7 @@ INT_PTR CALLBACK CSkypeProto::PersonalSkypeDlgProc(HWND hwndDlg, UINT msg, WPARA
::SendMessage(GetDlgItem(hwndDlg, IDC_BIRTH_DAY), CB_ADDSTRING, 0, (LPARAM)date);
}
BYTE bday = ::db_get_b(NULL, ppro->m_szModuleName, "BirthDay", 0);
- if (bday > 1 && bday < 32)
+ if (bday > 0 && bday < 32)
{
::mir_sntprintf(date, 3, L"%02d", bday);
::SetDlgItemText(hwndDlg, IDC_BIRTH_DAY, date);
@@ -463,7 +463,7 @@ INT_PTR CALLBACK CSkypeProto::PersonalSkypeDlgProc(HWND hwndDlg, UINT msg, WPARA
::SendMessage(::GetDlgItem(hwndDlg, IDC_BIRTH_MONTH), CB_ADDSTRING, 0, (LPARAM)date);
}
BYTE bmon = ::db_get_b(NULL, ppro->m_szModuleName, "BirthMonth", 0);
- if (bmon > 1 && bmon < 13)
+ if (bmon > 0 && bmon < 13)
{
::mir_sntprintf(date, 3, L"%02d", bmon);
::SetDlgItemText(hwndDlg, IDC_BIRTH_MONTH, date);
@@ -475,7 +475,6 @@ INT_PTR CALLBACK CSkypeProto::PersonalSkypeDlgProc(HWND hwndDlg, UINT msg, WPARA
{
::_itow(i, date, 10);
::SendMessage(::GetDlgItem(hwndDlg, IDC_BIRTH_YEAR), CB_ADDSTRING, 0, (LPARAM)date);
-
}
WORD byear = ::db_get_w(NULL, ppro->m_szModuleName, "BirthYear", 0);
if (byear > 1900 && bmon < 2214)
diff --git a/protocols/Skype/src/skype_own_info.cpp b/protocols/Skype/src/skype_own_info.cpp
index 47e58b524a..4a3b5415fc 100644
--- a/protocols/Skype/src/skype_own_info.cpp
+++ b/protocols/Skype/src/skype_own_info.cpp
@@ -49,10 +49,12 @@ void CSkypeProto::SaveOwnInfoToServer(HWND hwndPage, int iPage)
this->account->SetIntProperty(Account::P_BIRTHDAY, value);
int lang = ::SendMessage(GetDlgItem(hwndPage, IDC_LANGUAGE), CB_GETCURSEL, 0, 0);
- std::wstring key = *(std::wstring *)SendMessage(GetDlgItem(hwndPage, IDC_LANGUAGE), CB_GETITEMDATA, lang, 0);
- this->account->SetStrProperty(
- Account::P_LANGUAGES,
- (char*)mir_ptr<char>(::mir_utf8encodeW(CSkypeProto::languages[key].c_str())));
+ if (lang != -1) {
+ std::wstring key = *(std::wstring *)SendMessage(GetDlgItem(hwndPage, IDC_LANGUAGE), CB_GETITEMDATA, lang, 0);
+ this->account->SetStrProperty(
+ Account::P_LANGUAGES,
+ (char*)mir_ptr<char>(::mir_utf8encodeW(CSkypeProto::languages[key].c_str())));
+ }
}
break;