summaryrefslogtreecommitdiff
path: root/plugins/Non-IM Contact/src/dialog.cpp
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-11-30 18:33:56 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-11-30 18:33:56 +0000
commit4f0e30cdf56fbafdf955bbe8b93930bab9e39bd0 (patch)
treeded36ec10c55fb5d33c8d2e471ec808eeb058a04 /plugins/Non-IM Contact/src/dialog.cpp
parent237d02ebbabbedfb8b33160ebfb5250bbd491eca (diff)
Fix buf size for Get/Set text, open/save file name
SMS: SIZE_T -> size_t MRA: small code cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@11175 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Non-IM Contact/src/dialog.cpp')
-rw-r--r--plugins/Non-IM Contact/src/dialog.cpp6
1 files changed, 3 insertions, 3 deletions
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");