From 869c86912bb22530f3dc9369c02e4455de6bdb21 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 16 May 2015 19:17:38 +0000 Subject: fix for strncat use git-svn-id: http://svn.miranda-ng.org/main/trunk@13653 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Twitter/src/ui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols/Twitter') diff --git a/protocols/Twitter/src/ui.cpp b/protocols/Twitter/src/ui.cpp index de33178bbd..4d696207a1 100644 --- a/protocols/Twitter/src/ui.cpp +++ b/protocols/Twitter/src/ui.cpp @@ -84,7 +84,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM GetDlgItemTextA(hwndDlg, IDC_SERVER, str, SIZEOF(str) - 1); if (str[strlen(str) - 1] != '/') - strncat(str, "/", sizeof(str)); + strncat(str, "/", SIZEOF(str) - mir_strlen(str)); db_set_s(0, proto->ModuleName(), TWITTER_KEY_BASEURL, str); GetDlgItemText(hwndDlg, IDC_GROUP, tstr, SIZEOF(tstr)); @@ -231,7 +231,7 @@ INT_PTR CALLBACK options_proc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar GetDlgItemTextA(hwndDlg, IDC_BASEURL, str, SIZEOF(str) - 1); if (str[strlen(str) - 1] != '/') - strncat(str, "/", sizeof(str)); + strncat(str, "/", SIZEOF(str) - mir_strlen(str)); db_set_s(0, proto->ModuleName(), TWITTER_KEY_BASEURL, str); db_set_b(0, proto->ModuleName(), TWITTER_KEY_CHATFEED, IsDlgButtonChecked(hwndDlg, IDC_CHATFEED) != 0); -- cgit v1.2.3