Increased static buffer size and forced initialization (#514)
This is a temporary measure waiting for a more complete refactoring.
This commit is contained in:
parent
fb452e0c69
commit
fe2defb536
@ -162,7 +162,7 @@ int FileDialog::setExtsFilter(const TCHAR *extText, const TCHAR *exts)
|
||||
return _nbExt;
|
||||
}
|
||||
|
||||
TCHAR * FileDialog::doOpenSingleFileDlg()
|
||||
TCHAR* FileDialog::doOpenSingleFileDlg()
|
||||
{
|
||||
TCHAR dir[MAX_PATH];
|
||||
::GetCurrentDirectory(MAX_PATH, dir);
|
||||
@ -212,17 +212,22 @@ stringVector * FileDialog::doOpenMultiFilesDlg()
|
||||
|
||||
if (res)
|
||||
{
|
||||
TCHAR fn[MAX_PATH];
|
||||
TCHAR *pFn = _fileName + lstrlen(_fileName) + 1;
|
||||
TCHAR* pFn = _fileName + lstrlen(_fileName) + 1;
|
||||
TCHAR fn[MAX_PATH*8];
|
||||
memset(fn, 0x0, sizeof(fn));
|
||||
|
||||
if (!(*pFn))
|
||||
{
|
||||
_fileNames.push_back(generic_string(_fileName));
|
||||
}
|
||||
else
|
||||
{
|
||||
lstrcpy(fn, _fileName);
|
||||
if (fn[lstrlen(fn)-1] != '\\')
|
||||
if (fn[lstrlen(fn) - 1] != '\\')
|
||||
lstrcat(fn, TEXT("\\"));
|
||||
}
|
||||
int term = int(lstrlen(fn));
|
||||
|
||||
int term = lstrlen(fn);
|
||||
|
||||
while (*pFn)
|
||||
{
|
||||
@ -234,10 +239,10 @@ stringVector * FileDialog::doOpenMultiFilesDlg()
|
||||
|
||||
return &_fileNames;
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
TCHAR * FileDialog::doSaveDlg()
|
||||
{
|
||||
TCHAR dir[MAX_PATH];
|
||||
|
Loading…
Reference in New Issue
Block a user