From e31ffb2251cd1c088bb6b56177e60e5e4bb853db Mon Sep 17 00:00:00 2001 From: Martin Schweiger Date: Tue, 3 Aug 2021 04:33:16 +0100 Subject: [PATCH] #37: use _execv in Orbiter_ng wrapper to pass command line arguments through to orbiter server. Now also returns the server exit value. --- Src/Orbiter_ng/Orbiter_ng.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Src/Orbiter_ng/Orbiter_ng.cpp b/Src/Orbiter_ng/Orbiter_ng.cpp index 67ff0b9c2..ea83007e0 100644 --- a/Src/Orbiter_ng/Orbiter_ng.cpp +++ b/Src/Orbiter_ng/Orbiter_ng.cpp @@ -6,8 +6,6 @@ INT WINAPI WinMain (HINSTANCE hInstance, HINSTANCE, LPSTR strCmdLine, INT nCmdShow) { - const char *cmd = "modules\\server\\orbiter.exe"; - char *args[1] = {NULL}; - _execl(cmd, cmd, NULL); - return 0; + const char *cmd = "Modules\\Server\\Orbiter.exe"; + return _execv(cmd, __argv); } \ No newline at end of file