https://git.reactos.org/?p=reactos.git;a=commitdiff;h=df54fb01fda9e7b24e897…
commit df54fb01fda9e7b24e89786ce1d9abd5f6fc33eb
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Thu Nov 23 08:34:56 2023 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Thu Nov 23 08:34:56 2023 +0900
[VGAFONTEDIT] Fix exception on New
Based on KRosUser's vgafont.patch. CORE-19192
---
modules/rosapps/applications/devutils/vgafontedit/fontwnd.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/rosapps/applications/devutils/vgafontedit/fontwnd.c
b/modules/rosapps/applications/devutils/vgafontedit/fontwnd.c
index fc865c25858..1d2bd8a3198 100644
--- a/modules/rosapps/applications/devutils/vgafontedit/fontwnd.c
+++ b/modules/rosapps/applications/devutils/vgafontedit/fontwnd.c
@@ -374,12 +374,17 @@ CreateFontWindow(IN PMAIN_WND_INFO MainWndInfo, IN PFONT_OPEN_INFO
OpenInfo)
if( InitFont(Info) )
{
- PWSTR pszWindowTitle;
+ PWSTR pch, pszWindowTitle;
if(OpenInfo->pszFileName)
- pszWindowTitle = wcsrchr(OpenInfo->pszFileName, '\\') + 1;
+ {
+ pch = wcsrchr(OpenInfo->pszFileName, '\\');
+ pszWindowTitle = (pch ? (pch + 1) : OpenInfo->pszFileName);
+ }
else
+ {
LoadAndFormatString(IDS_DOCNAME, &pszWindowTitle,
++MainWndInfo->uDocumentCounter);
+ }
hFontWnd = CreateMDIWindowW( szFontWndClass,
pszWindowTitle,