Fix a crash regression due to a bad length count for a replacement of wcscpy_s

This commit is contained in:
Don HO 2019-02-13 02:22:15 +01:00
parent 7fe3cda1d0
commit 1ab1624800

View File

@ -151,7 +151,7 @@ int FileDialog::setExtsFilter(const TCHAR *extText, const TCHAR *exts)
_nbCharFileExt += static_cast<int32_t>(extFilter.length()) + 1;
pFileExt = _fileExt + _nbCharFileExt;
curLen -= _nbCharFileExt;
curLen = nbCharNewFileExt - _nbCharFileExt;
wcscpy_s(pFileExt, curLen, exts);
_nbCharFileExt += lstrlen(exts) + 1;