mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- Fixed issue with pointer arithmetic and wchar_t in method "PolulateSectionFromCommandLine()" (by tazpn)
o Now this working method is enabled again in the source git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5164 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1397,9 +1397,7 @@ void GetRuntimeSettings( )
|
||||
#else
|
||||
vfs::PropertyContainer oProps;
|
||||
oProps.initFromIniFile(GAME_INI_FILE);
|
||||
|
||||
// WANNE: @tazpn: Disabled the method, because when I run a debug version directly from any VS (by pressing F5) the game crashes in the method.
|
||||
//PopulateSectionFromCommandLine(oProps, "Ja2 Settings");
|
||||
PopulateSectionFromCommandLine(oProps, "Ja2 Settings");
|
||||
#endif
|
||||
|
||||
#ifndef USE_VFS
|
||||
@@ -1835,7 +1833,7 @@ static void PopulateSectionFromCommandLine(vfs::PropertyContainer &oProps, vfs::
|
||||
int argc = 0, nchars = 0;
|
||||
ParseCommandLine( lpCommandLine, NULL, NULL, &argc, &nchars);
|
||||
wchar_t **argv = (wchar_t **)_alloca(argc * sizeof(wchar_t *) + nchars * sizeof(wchar_t));
|
||||
ParseCommandLine( lpCommandLine, argv, ((wchar_t*)argv) + argc * sizeof(wchar_t*), &argc, &nchars);
|
||||
ParseCommandLine( lpCommandLine, argv, (wchar_t *)(((char*)argv) + argc * sizeof(wchar_t*)), &argc, &nchars);
|
||||
|
||||
for (int i = 1; i < argc; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user