diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-11-30 18:33:56 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-11-30 18:33:56 +0000 |
commit | 4f0e30cdf56fbafdf955bbe8b93930bab9e39bd0 (patch) | |
tree | ded36ec10c55fb5d33c8d2e471ec808eeb058a04 /protocols/Xfire/src/options.cpp | |
parent | 237d02ebbabbedfb8b33160ebfb5250bbd491eca (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 'protocols/Xfire/src/options.cpp')
-rw-r--r-- | protocols/Xfire/src/options.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/protocols/Xfire/src/options.cpp b/protocols/Xfire/src/options.cpp index 056bb7b2cd..e3daffe50d 100644 --- a/protocols/Xfire/src/options.cpp +++ b/protocols/Xfire/src/options.cpp @@ -262,7 +262,7 @@ static INT_PTR CALLBACK DlgProcOpts2(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR char str[128]; DBVARIANT dbv; - GetDlgItemTextA(hwndDlg, IDC_LOGIN, login, sizeof(login)); + GetDlgItemTextA(hwndDlg, IDC_LOGIN, login, SIZEOF(login)); dbv.pszVal = NULL; if (db_get(NULL, protocolname, "login", &dbv) || lstrcmpA(login, dbv.pszVal)) reconnectRequired = 1; @@ -287,7 +287,7 @@ static INT_PTR CALLBACK DlgProcOpts2(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR db_set_s(NULL, protocolname, "Username", login); //nur wenn der nick erfolgreich übertragen wurde - GetDlgItemTextA(hwndDlg, IDC_NICK, login, sizeof(login)); + GetDlgItemTextA(hwndDlg, IDC_NICK, login, SIZEOF(login)); dbv.pszVal = NULL; if (db_get(NULL, protocolname, "Nick", &dbv) || lstrcmpA(login, dbv.pszVal)) { @@ -297,14 +297,14 @@ static INT_PTR CALLBACK DlgProcOpts2(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR if (dbv.pszVal != NULL) db_free(&dbv); - GetDlgItemTextA(hwndDlg, IDC_PASSWORD, str, sizeof(str)); + GetDlgItemTextA(hwndDlg, IDC_PASSWORD, str, SIZEOF(str)); dbv.pszVal = NULL; if (db_get(NULL, protocolname, "password", &dbv) || lstrcmpA(str, dbv.pszVal)) reconnectRequired = 1; if (dbv.pszVal != NULL) db_free(&dbv); db_set_s(NULL, protocolname, "password", str); - GetDlgItemTextA(hwndDlg, IDC_SERVER, str, sizeof(str)); + GetDlgItemTextA(hwndDlg, IDC_SERVER, str, SIZEOF(str)); //neue preferencen sichern if (bpStatus != ID_STATUS_OFFLINE&&bpStatus != ID_STATUS_CONNECTING) @@ -331,7 +331,7 @@ static INT_PTR CALLBACK DlgProcOpts2(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR } //protocolversion wird autoamtisch vergeben - //GetDlgItemTextA(hwndDlg,IDC_PVER,str,sizeof(str)); + //GetDlgItemTextA(hwndDlg,IDC_PVER,str,SIZEOF(str)); //db_set_b(NULL,protocolname,"protover",(char)atoi(str)); if (reconnectRequired) @@ -558,7 +558,7 @@ static INT_PTR CALLBACK DlgProcOpts3(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR db_set_b(NULL, protocolname, "scanalways", (BYTE)ccc); //protocolversion wird autoamtisch vergeben - //GetDlgItemTextA(hwndDlg,IDC_PVER,str,sizeof(str)); + //GetDlgItemTextA(hwndDlg,IDC_PVER,str,SIZEOF(str)); //db_set_b(NULL,protocolname,"protover",(char)atoi(str)); if (reconnectRequired) MessageBox(hwndDlg, TranslateT("The changes you have made require you to reconnect to the XFire network before they take effect"), TranslateT("XFire Options"), MB_OK | MB_ICONINFORMATION); @@ -739,7 +739,7 @@ static INT_PTR CALLBACK DlgProcOpts5(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR int reconnectRequired = 0; char str[512]; - GetDlgItemTextA(hwndDlg, IDC_STATUSMSG, str, sizeof(str)); + GetDlgItemTextA(hwndDlg, IDC_STATUSMSG, str, SIZEOF(str)); db_set_s(NULL, protocolname, "setstatusmsg", str); db_set_b(NULL, protocolname, "autosetstatusmsg", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_ENABLESTSMSG)); @@ -1053,7 +1053,7 @@ static INT_PTR CALLBACK DlgProcOpts6(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR //extra parameter auslesen und das gameobj schreiben char str[128] = ""; - GetDlgItemTextA(hwndDlg, IDC_EXTRAPARAMS, str, sizeof(str)); + GetDlgItemTextA(hwndDlg, IDC_EXTRAPARAMS, str, SIZEOF(str)); if (str[0] != 0) { //extra parameter sind gesetzt, zuweisen |