mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 02:26:03 +00:00
[MSPAINT] Fix filter string UNICODE_NULL problem
Follow-up to #5882. Some ATL CString do not append the string if there is a UNICODE_NULL in the middle. CORE-19094
This commit is contained in:
parent
640d67d12a
commit
b69a7460db
1 changed files with 4 additions and 2 deletions
|
@ -209,7 +209,8 @@ BOOL CMainWindow::GetOpenFileName(IN OUT LPWSTR pszFile, INT cchMaxFile)
|
||||||
// Get the import filter
|
// Get the import filter
|
||||||
CSimpleArray<GUID> aguidFileTypesI;
|
CSimpleArray<GUID> aguidFileTypesI;
|
||||||
CImage::GetImporterFilterString(strFilter, aguidFileTypesI, strAllPictureFiles,
|
CImage::GetImporterFilterString(strFilter, aguidFileTypesI, strAllPictureFiles,
|
||||||
CImage::excludeDefaultLoad, UNICODE_NULL);
|
CImage::excludeDefaultLoad, L'|');
|
||||||
|
strFilter.Replace(L'|', UNICODE_NULL);
|
||||||
|
|
||||||
// Initializing the OPENFILENAME structure for GetOpenFileName
|
// Initializing the OPENFILENAME structure for GetOpenFileName
|
||||||
ZeroMemory(&ofn, sizeof(ofn));
|
ZeroMemory(&ofn, sizeof(ofn));
|
||||||
|
@ -236,7 +237,8 @@ BOOL CMainWindow::GetSaveFileName(IN OUT LPWSTR pszFile, INT cchMaxFile)
|
||||||
// Get the export filter
|
// Get the export filter
|
||||||
CSimpleArray<GUID> aguidFileTypesE;
|
CSimpleArray<GUID> aguidFileTypesE;
|
||||||
CImage::GetExporterFilterString(strFilter, aguidFileTypesE, NULL,
|
CImage::GetExporterFilterString(strFilter, aguidFileTypesE, NULL,
|
||||||
CImage::excludeDefaultSave, UNICODE_NULL);
|
CImage::excludeDefaultSave, L'|');
|
||||||
|
strFilter.Replace(L'|', UNICODE_NULL);
|
||||||
|
|
||||||
// Initializing the OPENFILENAME structure for GetSaveFileName
|
// Initializing the OPENFILENAME structure for GetSaveFileName
|
||||||
ZeroMemory(&sfn, sizeof(sfn));
|
ZeroMemory(&sfn, sizeof(sfn));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue