Don't use memset to initialize tTbData

Fix #12084, close #12085
This commit is contained in:
ozone10 2022-09-02 15:07:53 +02:00 committed by Don Ho
parent 39ab226c8c
commit 95cb564c27
1 changed files with 2 additions and 4 deletions

View File

@ -6802,8 +6802,7 @@ void Notepad_plus::launchFileBrowser(const vector<generic_string> & folders, con
_pFileBrowser = new FileBrowser; _pFileBrowser = new FileBrowser;
_pFileBrowser->init(_pPublicInterface->getHinst(), _pPublicInterface->getHSelf()); _pFileBrowser->init(_pPublicInterface->getHinst(), _pPublicInterface->getHSelf());
tTbData data; tTbData data = {};
memset(&data, 0, sizeof(data));
_pFileBrowser->create(&data, _nativeLangSpeaker.isRTL()); _pFileBrowser->create(&data, _nativeLangSpeaker.isRTL());
data.pszName = TEXT("ST"); data.pszName = TEXT("ST");
@ -6912,8 +6911,7 @@ void Notepad_plus::launchProjectPanel(int cmdID, ProjectPanel ** pProjPanel, int
(*pProjPanel)->setWorkSpaceFilePath(nppParam.getWorkSpaceFilePath(panelID)); (*pProjPanel)->setWorkSpaceFilePath(nppParam.getWorkSpaceFilePath(panelID));
NativeLangSpeaker *pNativeSpeaker = nppParam.getNativeLangSpeaker(); NativeLangSpeaker *pNativeSpeaker = nppParam.getNativeLangSpeaker();
bool isRTL = pNativeSpeaker->isRTL(); bool isRTL = pNativeSpeaker->isRTL();
tTbData data; tTbData data = {};
memset(&data, 0, sizeof(data));
(*pProjPanel)->create(&data, isRTL); (*pProjPanel)->create(&data, isRTL);
data.pszName = TEXT("ST"); data.pszName = TEXT("ST");