mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:26:17 +00:00
[FONTVIEW]
In WinMain, higher the scope of szFileName to ensure that it and all variables that point to it are valid throughout the program. Should fix CID 731447. Patch by Ricardo Hanke CORE-9360 #resolve svn path=/trunk/; revision=66694
This commit is contained in:
parent
7df0a113d2
commit
ceb8bad33a
1 changed files with 3 additions and 3 deletions
|
@ -93,12 +93,13 @@ WinMain (HINSTANCE hThisInstance,
|
||||||
{
|
{
|
||||||
int argc;
|
int argc;
|
||||||
WCHAR** argv;
|
WCHAR** argv;
|
||||||
|
WCHAR szFileName[MAX_PATH] = L"";
|
||||||
DWORD dwSize;
|
DWORD dwSize;
|
||||||
HWND hMainWnd;
|
HWND hMainWnd;
|
||||||
MSG msg;
|
MSG msg;
|
||||||
WNDCLASSEXW wincl;
|
WNDCLASSEXW wincl;
|
||||||
LPCWSTR fileName;
|
LPCWSTR fileName;
|
||||||
|
|
||||||
switch (GetUserDefaultUILanguage())
|
switch (GetUserDefaultUILanguage())
|
||||||
{
|
{
|
||||||
case MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT):
|
case MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT):
|
||||||
|
@ -108,7 +109,7 @@ WinMain (HINSTANCE hThisInstance,
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_hInstance = hThisInstance;
|
g_hInstance = hThisInstance;
|
||||||
|
|
||||||
/* Get unicode command line */
|
/* Get unicode command line */
|
||||||
|
@ -116,7 +117,6 @@ WinMain (HINSTANCE hThisInstance,
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
{
|
{
|
||||||
OPENFILENAMEW fontOpen;
|
OPENFILENAMEW fontOpen;
|
||||||
WCHAR szFileName[MAX_PATH] = L"";
|
|
||||||
HLOCAL dialogTitle = NULL;
|
HLOCAL dialogTitle = NULL;
|
||||||
|
|
||||||
/* Gets the title for the dialog box ready */
|
/* Gets the title for the dialog box ready */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue