summaryrefslogtreecommitdiff
path: root/plugins/WhenWasIt/src/notifiers.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-02-28 13:35:22 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-02-28 13:35:22 +0000
commita0c7844f40b5f5b7f7948d095218889594e2f0ca (patch)
tree1e1e47807c5acfac9774af28b9fc77d5c5cff346 /plugins/WhenWasIt/src/notifiers.cpp
parentbce04f5be6d0e881b21e8fd43fb12a6045756ebd (diff)
WhenWasIt:
- minor fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@12288 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/WhenWasIt/src/notifiers.cpp')
-rw-r--r--plugins/WhenWasIt/src/notifiers.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/WhenWasIt/src/notifiers.cpp b/plugins/WhenWasIt/src/notifiers.cpp
index 336970b224..e3fcdbd1db 100644
--- a/plugins/WhenWasIt/src/notifiers.cpp
+++ b/plugins/WhenWasIt/src/notifiers.cpp
@@ -35,8 +35,8 @@ void PopupNotifyNoBirthdays()
FillPopupData(pd, -1);
pd.lchIcon = GetDTBIcon(-1);
- _tcscpy(pd.lptzContactName, TranslateT("WhenWasIt"));
- _tcscpy(pd.lptzText, TranslateT("No upcoming birthdays."));
+ _tcsncpy(pd.lptzContactName, TranslateT("WhenWasIt"), MAX_CONTACTNAME -1);
+ _tcsncpy(pd.lptzText, TranslateT("No upcoming birthdays."), MAX_SECONDLINE -1);
PUAddPopupT(&pd);
}
@@ -81,7 +81,7 @@ int PopupNotifyBirthday(MCONTACT hContact, int dtb, int age)
pd.PluginWindowProc = DlgProcPopup;
pd.lchIcon = GetDTBIcon(dtb);
- mir_sntprintf(pd.lptzContactName, SIZEOF(pd.lptzContactName), TranslateT("Birthday - %s"), name);
+ mir_sntprintf(pd.lptzContactName, MAX_CONTACTNAME, TranslateT("Birthday - %s"), name);
TCHAR *sex;
switch (toupper(gender)) {
case _T('M'):
@@ -96,12 +96,12 @@ int PopupNotifyBirthday(MCONTACT hContact, int dtb, int age)
}
if (age > 0) {
if (dtb > 0)
- mir_sntprintf(pd.lptzText, SIZEOF(pd.lptzText), TranslateT("%s\n%s will be %d years old."), text, sex, age);
+ mir_sntprintf(pd.lptzText, MAX_SECONDLINE, TranslateT("%s\n%s will be %d years old."), text, sex, age);
else
- mir_sntprintf(pd.lptzText, SIZEOF(pd.lptzText), TranslateT("%s\n%s just turned %d."), text, sex, age);
+ mir_sntprintf(pd.lptzText, MAX_SECONDLINE, TranslateT("%s\n%s just turned %d."), text, sex, age);
}
else
- mir_tstrncpy(pd.lptzText, text, mir_tstrlen(text));
+ mir_tstrncpy(pd.lptzText, text, MAX_SECONDLINE-1);
PUAddPopupT(&pd);
@@ -125,7 +125,7 @@ int PopupNotifyMissedBirthday(MCONTACT hContact, int dab, int age)
pd.PluginWindowProc = DlgProcPopup;
pd.lchIcon = GetDTBIcon(dab);
- mir_sntprintf(pd.lptzContactName, SIZEOF(pd.lptzContactName), TranslateT("Birthday - %s"), name);
+ mir_sntprintf(pd.lptzContactName, MAX_CONTACTNAME, TranslateT("Birthday - %s"), name);
TCHAR *sex;
switch (toupper(gender)) {
case _T('M'):
@@ -140,12 +140,12 @@ int PopupNotifyMissedBirthday(MCONTACT hContact, int dab, int age)
}
if (age > 0){
if (dab > 0)
- mir_sntprintf(pd.lptzText, SIZEOF(pd.lptzText), TranslateT("%s\n%s just turned %d."), text, sex, age);
+ mir_sntprintf(pd.lptzText, MAX_SECONDLINE, TranslateT("%s\n%s just turned %d."), text, sex, age);
else
- mir_sntprintf(pd.lptzText, SIZEOF(pd.lptzText), TranslateT("%s\n%s just turned %d."), text, sex, age);
+ mir_sntprintf(pd.lptzText, MAX_SECONDLINE, TranslateT("%s\n%s just turned %d."), text, sex, age);
}
else
- mir_tstrncpy(pd.lptzText, text, mir_tstrlen(text));
+ mir_tstrncpy(pd.lptzText, text, MAX_SECONDLINE-1);
PUAddPopupT(&pd);
return 0;