diff options
Diffstat (limited to 'plugins/Non-IM Contact')
-rw-r--r-- | plugins/Non-IM Contact/src/contactinfo.cpp | 8 | ||||
-rw-r--r-- | plugins/Non-IM Contact/src/dialog.cpp | 6 | ||||
-rw-r--r-- | plugins/Non-IM Contact/src/files.cpp | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/plugins/Non-IM Contact/src/contactinfo.cpp b/plugins/Non-IM Contact/src/contactinfo.cpp index d5a9a51dfa..0e162b3674 100644 --- a/plugins/Non-IM Contact/src/contactinfo.cpp +++ b/plugins/Non-IM Contact/src/contactinfo.cpp @@ -29,7 +29,7 @@ INT_PTR CALLBACK DlgProcContactInfo(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (GetWindowTextLength(GetDlgItem(hwnd,IDC_DISPLAY_NAME))) {
char text[512];
- GetDlgItemTextA(hwnd,IDC_DISPLAY_NAME,text,sizeof(text));
+ GetDlgItemTextA(hwnd,IDC_DISPLAY_NAME,text,SIZEOF(text));
db_set_s(hContact, MODNAME, "Name", text);
WriteSetting(hContact, MODNAME, "Name", MODNAME, "Nick");
}
@@ -40,7 +40,7 @@ INT_PTR CALLBACK DlgProcContactInfo(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l if (GetWindowTextLength(GetDlgItem(hwnd,IDC_TOOLTIP))) {
char text[2048];
- GetDlgItemTextA(hwnd,IDC_TOOLTIP,text,sizeof(text));
+ GetDlgItemTextA(hwnd,IDC_TOOLTIP,text,SIZEOF(text));
db_set_s(hContact, MODNAME, "ToolTip", text);
WriteSetting(hContact, MODNAME, "ToolTip", "UserInfo", "MyNotes");
}
@@ -227,7 +227,7 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP if (GetWindowTextLength(GetDlgItem(hwnd,IDC_LINK))) {
char text[512];
- GetDlgItemTextA(hwnd,IDC_LINK,text,sizeof(text));
+ GetDlgItemTextA(hwnd,IDC_LINK,text,SIZEOF(text));
db_set_s(hContact, MODNAME, "ProgramString", text);
WriteSetting(hContact, MODNAME, "ProgramString", MODNAME, "Program");
}
@@ -235,7 +235,7 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP if (GetWindowTextLength(GetDlgItem(hwnd,IDC_PARAMS))) {
char text[512];
- GetDlgItemTextA(hwnd,IDC_PARAMS,text,sizeof(text));
+ GetDlgItemTextA(hwnd,IDC_PARAMS,text,SIZEOF(text));
db_set_s(hContact, MODNAME, "ProgramParamsString", text);
WriteSetting(hContact, MODNAME, "ProgramParamsString", MODNAME, "ProgramParams");
}
diff --git a/plugins/Non-IM Contact/src/dialog.cpp b/plugins/Non-IM Contact/src/dialog.cpp index e3bb42af03..4c73fefa2e 100644 --- a/plugins/Non-IM Contact/src/dialog.cpp +++ b/plugins/Non-IM Contact/src/dialog.cpp @@ -68,7 +68,7 @@ INT_PTR CALLBACK DlgProcNimcOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar TCHAR tmp[5];
db_set_b(NULL, MODNAME, "AwayAsStatus", (BYTE)IsDlgButtonChecked(hwnd, IDC_AWAYISNOTONLINE));
if (!IsDlgButtonChecked(hwnd, IDC_DISABLETIMER) && GetWindowTextLength(GetDlgItem(hwnd, IDC_TIMER_INT))) {
- GetDlgItemText(hwnd, IDC_TIMER_INT, tmp, 4);
+ GetDlgItemText(hwnd, IDC_TIMER_INT, tmp, SIZEOF(tmp));
db_set_w(NULL, MODNAME, "Timer",(WORD)_ttoi(tmp));
}
else db_set_w(NULL, MODNAME, "Timer",0);
@@ -142,7 +142,7 @@ INT_PTR CALLBACK TestWindowDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP char tmp[MAX_STRING_LENGTH];
int i=0,j;
if (GetWindowTextLength(GetDlgItem(hwnd, IDC_STRING))) {
- GetDlgItemTextA(hwnd, IDC_STRING, tmp, MAX_STRING_LENGTH);
+ GetDlgItemTextA(hwnd, IDC_STRING, tmp, SIZEOF(tmp));
if (tmp[strlen(tmp)-1] == '(') {
for (i=0; i<VARS; i++) {
if (!strcmp(braceList[i].var,&tmp[strlen(tmp)-strlen(braceList[i].var)])) {
@@ -184,7 +184,7 @@ INT_PTR CALLBACK TestWindowDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP char str2replace[MAX_STRING_LENGTH], replacedString[MAX_STRING_LENGTH];
int error;
if (GetWindowTextLength(GetDlgItem(hwnd, IDC_STRING))) {
- GetDlgItemTextA(hwnd, IDC_STRING, str2replace, MAX_STRING_LENGTH);
+ GetDlgItemTextA(hwnd, IDC_STRING, str2replace, SIZEOF(str2replace));
switch (stringReplacer(str2replace, replacedString, NULL)) {
case ERROR_NO_LINE_AFTER_VAR_F:
mir_snprintf(replacedString, SIZEOF(replacedString), "ERROR: no %s","%line or %wholeline or %lastline after %fn");
diff --git a/plugins/Non-IM Contact/src/files.cpp b/plugins/Non-IM Contact/src/files.cpp index f5202e5b6d..226935c79e 100644 --- a/plugins/Non-IM Contact/src/files.cpp +++ b/plugins/Non-IM Contact/src/files.cpp @@ -183,7 +183,7 @@ INT_PTR CALLBACK DlgProcFiles(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
char text[512], url[512], fn[10] = "fn0", szFileName[MAX_PATH], temp[512];
int i, timer;
- GetDlgItemTextA(hwnd,IDC_URL,text,sizeof(text));
+ GetDlgItemTextA(hwnd,IDC_URL,text,SIZEOF(text));
strcpy(url, text);
if (!InternetDownloadFile(text))
{
@@ -202,7 +202,7 @@ INT_PTR CALLBACK DlgProcFiles(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) timer = 60;
else
{
- GetDlgItemTextA(hwnd,IDC_WWW_TIMER,text,sizeof(text));
+ GetDlgItemTextA(hwnd,IDC_WWW_TIMER,text,SIZEOF(text));
timer = atoi(text);
}
db_set_w(NULL, MODNAME, strcat(fn, "_timer"), (WORD)timer);
|