summaryrefslogtreecommitdiff
path: root/plugins/Msg_Export
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/Msg_Export
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/Msg_Export')
-rwxr-xr-xplugins/Msg_Export/src/options.cpp16
-rwxr-xr-xplugins/Msg_Export/src/utils.cpp2
2 files changed, 9 insertions, 9 deletions
diff --git a/plugins/Msg_Export/src/options.cpp b/plugins/Msg_Export/src/options.cpp
index 6d7ef44862..599ff08953 100755
--- a/plugins/Msg_Export/src/options.cpp
+++ b/plugins/Msg_Export/src/options.cpp
@@ -297,7 +297,7 @@ void SetToDefault( HWND hParent )
}
TCHAR szTemp[ 500 ];
- if ( !GetDlgItemText( hParent, IDC_DEFAULT_FILE, szTemp, sizeof( szTemp)) )
+ if ( !GetDlgItemText( hParent, IDC_DEFAULT_FILE, szTemp, SIZEOF(szTemp)) )
return;
LVITEM sItem = { 0 };
@@ -359,16 +359,16 @@ BOOL bApplyChanges( HWND hwndDlg )
nMaxLineWidth = nTmp;
}
- GetDlgItemText(hwndDlg, IDC_EXPORT_TIMEFORMAT, szTemp, sizeof( szTemp));
+ GetDlgItemText(hwndDlg, IDC_EXPORT_TIMEFORMAT, szTemp, SIZEOF(szTemp));
sTimeFormat = szTemp;
- GetDlgItemText(hwndDlg, IDC_EXPORT_DIR, szTemp, sizeof( szTemp));
+ GetDlgItemText(hwndDlg, IDC_EXPORT_DIR, szTemp, SIZEOF(szTemp));
sExportDir = szTemp;
- GetDlgItemText(hwndDlg, IDC_DEFAULT_FILE, szTemp, sizeof( szTemp));
+ GetDlgItemText(hwndDlg, IDC_DEFAULT_FILE, szTemp, SIZEOF(szTemp));
sDefaultFile = szTemp;
- GetDlgItemText(hwndDlg, IDC_FILE_VIEWER, szTemp, sizeof( szTemp));
+ GetDlgItemText(hwndDlg, IDC_FILE_VIEWER, szTemp, SIZEOF(szTemp));
sFileViewerPrg = szTemp;
bUseInternalViewer( IsDlgButtonChecked(hwndDlg, IDC_USE_INTERNAL_VIEWER ) == BST_CHECKED);
@@ -469,7 +469,7 @@ void AutoFindeFileNames(HWND hwndDlg)
{
TCHAR szDefaultFile[500];
- GetDlgItemText(hwndDlg, IDC_DEFAULT_FILE, szDefaultFile, sizeof( szDefaultFile));
+ GetDlgItemText(hwndDlg, IDC_DEFAULT_FILE, szDefaultFile, SIZEOF(szDefaultFile));
LVITEM sItem = { 0 };
@@ -891,13 +891,13 @@ static INT_PTR CALLBACK DlgProcMsgExportOpts(HWND hwndDlg, UINT msg, WPARAM wPar
OPENFILENAME ofn = { 0 }; // common dialog box structure
TCHAR szFile[260]; // buffer for file name
- GetDlgItemText(hwndDlg, IDC_FILE_VIEWER, szFile, sizeof(szFile));
+ GetDlgItemText(hwndDlg, IDC_FILE_VIEWER, szFile, SIZEOF(szFile));
// Initialize OPENFILENAME
//ZeroMemory(&ofn, sizeof(OPENFILENAME));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = hwndDlg;
ofn.lpstrFile = szFile;
- ofn.nMaxFile = sizeof(szFile);
+ ofn.nMaxFile = SIZEOF(szFile);
TCHAR buf[MAX_PATH];
mir_sntprintf(buf, SIZEOF(buf), _T("%s (*.exe;*.com;*.bat;*.cmd)%c*.exe;*.com;*.bat;*.cmd%c%s (*.*)%c*.*%c%c"), TranslateT("Executable files"), 0, 0, TranslateT("All files"), 0, 0, 0);
ofn.lpstrFilter = buf;
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp
index 0dc51f7af1..763be95870 100755
--- a/plugins/Msg_Export/src/utils.cpp
+++ b/plugins/Msg_Export/src/utils.cpp
@@ -943,7 +943,7 @@ void DisplayErrorDialog( const TCHAR *pszError, tstring& sFilePath, DBEVENTINFO
ofn.lStructSize = sizeof(OPENFILENAME);
//ofn.hwndOwner = NULL;
ofn.lpstrFile = szFile;
- ofn.nMaxFile = sizeof(szFile);
+ ofn.nMaxFile = SIZEOF(szFile);
ofn.lpstrFilter = TranslateT("All\0*.*\0Text\0*.TXT\0\0");
ofn.nFilterIndex = 1;
ofn.lpstrFileTitle = NULL;