From 5504428ab29cacbdc8bb7ca704e6108638bf4ecf Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Thu, 9 Apr 2015 18:59:21 +0000 Subject: NewAwaySys: - Minor fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@12716 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewAwaySysMod/src/Common.h | 5 +---- plugins/NewAwaySysMod/src/SetAwayMsg.cpp | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'plugins/NewAwaySysMod/src') diff --git a/plugins/NewAwaySysMod/src/Common.h b/plugins/NewAwaySysMod/src/Common.h index 178eb52bfb..77da4837d3 100644 --- a/plugins/NewAwaySysMod/src/Common.h +++ b/plugins/NewAwaySysMod/src/Common.h @@ -330,10 +330,7 @@ static __inline int LogMessage(const char *Format, ...) __inline int CallAllowedPS_SETAWAYMSG(const char *szProto, int iMode, const char *szMsg) { // we must use this function everywhere we want to call PS_SETAWAYMSG, otherwise NAS won't allow to change the message! LogMessage("PS_SETAWAYMSG called by NAS. szProto=%s, Status=%d, Msg:\n%s", szProto, iMode, szMsg ? szMsg : "NULL"); - char str[MAXMODULELABELLENGTH]; - strcpy(str, szProto); - strcat(str, PS_SETAWAYMSG); - return CallService(str, (WPARAM)iMode, (LPARAM)szMsg); + return CallProtoService(szProto, PS_SETAWAYMSG, (WPARAM)iMode, (LPARAM)szMsg); } static __inline int my_variables_showhelp(HWND hwndDlg, UINT uIDEdit, int flags = 0, char *szSubjectDesc = NULL, char *szExtraDesc = NULL) diff --git a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp index a30283fb4f..3c493878dd 100644 --- a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp +++ b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp @@ -849,7 +849,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA return true; } TCHAR BtnTitle[64]; - _sntprintf(BtnTitle, sizeof(BtnTitle), TranslateT("Closing in %d"), Countdown); + mir_sntprintf(BtnTitle, SIZEOF(BtnTitle), TranslateT("Closing in %d"), Countdown); SetDlgItemText(hwndDlg, IDC_OK, BtnTitle); Countdown--; } -- cgit v1.2.3