summaryrefslogtreecommitdiff
path: root/plugins/BuddyExpectator/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/BuddyExpectator/src')
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp8
-rw-r--r--plugins/BuddyExpectator/src/options.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index ee86de1094..e363ee2eeb 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -230,11 +230,11 @@ bool isContactGoneFor(MCONTACT hContact, int days)
ppd.lchContact = hContact;
ppd.lchIcon = Skin_GetIcon("enabled_icon");
- mir_sntprintf(ppd.lptzContactName, MAX_CONTACTNAME, TranslateT("Hiding %s (%S)"),
+ mir_sntprintf(ppd.lptzContactName, SIZEOF(ppd.lptzContactName), TranslateT("Hiding %s (%S)"),
CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR),
GetContactProto(hContact));
- mir_sntprintf(ppd.lptzText, MAX_SECONDLINE, TranslateT("%d days since last message"), daysSinceMessage);
+ mir_sntprintf(ppd.lptzText, SIZEOF(ppd.lptzText), TranslateT("%d days since last message"), daysSinceMessage);
if (!options.iUsePopupColors) {
ppd.colorBack = options.iPopupColorBack;
@@ -288,7 +288,7 @@ void ReturnNotify(MCONTACT hContact, TCHAR *message)
TCHAR* nick = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,hContact,GCDNF_TCHAR);
TCHAR tmpMsg[512];
- mir_sntprintf(tmpMsg, 512, _T("%s %s"), nick, message);
+ mir_sntprintf(tmpMsg, SIZEOF(tmpMsg), _T("%s %s"), nick, message);
cle.ptszTooltip = tmpMsg;
CallServiceSync(MS_CLIST_ADDEVENT, 0, (LPARAM) &cle);
@@ -326,7 +326,7 @@ void GoneNotify(MCONTACT hContact, TCHAR *message)
TCHAR* nick = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,hContact,GCDNF_TCHAR);
TCHAR tmpMsg[512];
- mir_sntprintf(tmpMsg, 512, _T("%s %s"), nick, message);
+ mir_sntprintf(tmpMsg, SIZEOF(tmpMsg), _T("%s %s"), nick, message);
cle.ptszTooltip = tmpMsg;
cle.flags = CLEF_TCHAR;
diff --git a/plugins/BuddyExpectator/src/options.cpp b/plugins/BuddyExpectator/src/options.cpp
index 9ed3b0c67e..49e319a807 100644
--- a/plugins/BuddyExpectator/src/options.cpp
+++ b/plugins/BuddyExpectator/src/options.cpp
@@ -326,8 +326,8 @@ static INT_PTR CALLBACK PopupOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP
ppd.lchContact = NULL;
ppd.lchIcon = hIcon;
_tcsncpy(ppd.lptzContactName, TranslateT("Contact name"), MAX_CONTACTNAME);
- TCHAR szPreviewText[50];
- mir_sntprintf(szPreviewText,50,TranslateT("has returned after being absent since %d days"),rand() % 30);
+ TCHAR szPreviewText[250];
+ mir_sntprintf(szPreviewText, SIZEOF(szPreviewText), TranslateT("has returned after being absent since %d days"), rand() % 30);
_tcsncpy(ppd.lptzText, szPreviewText, MAX_SECONDLINE);
// Get current popups colors options