Browse Source

game_launch: fix Win32 main

pull/2/head
Alibek Omarov 5 years ago
parent
commit
19303f7bd7
  1. 3
      game_launch/game.cpp

3
game_launch/game.cpp

@ -153,7 +153,7 @@ int __stdcall WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdLine, int @@ -153,7 +153,7 @@ int __stdcall WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdLine, int
int ret, i;
lpArgv = CommandLineToArgvW( GetCommandLineW(), &szArgc );
szArgv = ( char** )malloc( szArgc * sizeof( char* ));
szArgv = ( char** )malloc( (szArgc + 1) * sizeof( char* ));
for( i = 0; i < szArgc; ++i )
{
@ -161,6 +161,7 @@ int __stdcall WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdLine, int @@ -161,6 +161,7 @@ int __stdcall WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdLine, int
szArgv[i] = ( char* )malloc( size );
wcstombs( szArgv[i], lpArgv[i], size );
}
szArgv[szArgc] = 0;
LocalFree( lpArgv );

Loading…
Cancel
Save