From 37ff06314e6e869140b2679823464430d09994fd Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Mon, 28 May 2018 10:24:16 -1000 Subject: [PATCH] Windows fixes --- hecl/extern/boo | 2 +- hecl/test/main.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hecl/extern/boo b/hecl/extern/boo index d5ec7bcc1..6ff4229f9 160000 --- a/hecl/extern/boo +++ b/hecl/extern/boo @@ -1 +1 @@ -Subproject commit d5ec7bcc1ed5dbb5d25b1949cb4a94390277ef6e +Subproject commit 6ff4229f9b3ce7d303f78627091ab979946718c1 diff --git a/hecl/test/main.cpp b/hecl/test/main.cpp index 2bf8cf505..613bfbe27 100644 --- a/hecl/test/main.cpp +++ b/hecl/test/main.cpp @@ -317,7 +317,9 @@ int WINAPIV main(Platform::Array^ params) int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE, LPWSTR lpCmdLine, int) { int argc = 0; - const boo::SystemChar** argv = (const wchar_t**)(CommandLineToArgvW(lpCmdLine, &argc)); + const boo::SystemChar** argv; + if (lpCmdLine[0]) + argv = (const wchar_t**)(CommandLineToArgvW(lpCmdLine, &argc)); static boo::SystemChar selfPath[1024]; GetModuleFileNameW(nullptr, selfPath, 1024); static const boo::SystemChar* booArgv[32] = {}; @@ -326,7 +328,7 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE, LPWSTR lpCmdLine, int) booArgv[i+1] = argv[i]; logvisor::CreateWin32Console(); - return wmain(argc+1, booArgv); + return wmain(argc + 1, booArgv); } #endif