aboutsummaryrefslogtreecommitdiffstats
path: root/Samples/CommonSrc/Platform/Win32_Platform.cpp
diff options
context:
space:
mode:
authorBrad Davis <[email protected]>2013-10-13 20:28:58 -0700
committerBrad Davis <[email protected]>2013-10-13 20:28:58 -0700
commit672cdd0ef5455cd62a0d7f7eb6b9889f3ea35f21 (patch)
treef3454dc864242744aef1ea5474b5011556d0f388 /Samples/CommonSrc/Platform/Win32_Platform.cpp
parent1408ed7b208c7a1cff1a2448fc890e9b8bd6dc4e (diff)
Updating to cmake, glew, xrandr
Diffstat (limited to 'Samples/CommonSrc/Platform/Win32_Platform.cpp')
-rw-r--r--Samples/CommonSrc/Platform/Win32_Platform.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Samples/CommonSrc/Platform/Win32_Platform.cpp b/Samples/CommonSrc/Platform/Win32_Platform.cpp
index eeab429..09830d2 100644
--- a/Samples/CommonSrc/Platform/Win32_Platform.cpp
+++ b/Samples/CommonSrc/Platform/Win32_Platform.cpp
@@ -563,7 +563,7 @@ int WINAPI WinMain(HINSTANCE hinst, HINSTANCE prevInst, LPSTR inArgs, int show)
// Nested scope for container destructors to shutdown before DestroyApplication.
{
Array<String> args;
- Array<const char*> argv;
+ Array<char*> argv;
argv.PushBack("app");
const char* p = inArgs;
@@ -584,8 +584,9 @@ int WINAPI WinMain(HINSTANCE hinst, HINSTANCE prevInst, LPSTR inArgs, int show)
}
if (p != pstart)
args.PushBack(String(pstart, p - pstart));
+ // FIXME memory leak of the command line arguments here
for (UPInt i = 0; i < args.GetSize(); i++)
- argv.PushBack(args[i].ToCStr());
+ argv.PushBack(strdup(args[i].ToCStr()));
exitCode = g_app->OnStartup((int)argv.GetSize(), &argv[0]);
if (!exitCode)