From c3f933f3b09b3428e53a2c9fec6fb23f1b99afc9 Mon Sep 17 00:00:00 2001 From: Tony Cannon Date: Sun, 27 Oct 2019 16:26:57 -0700 Subject: [PATCH] fix remaing compile errors for release build (thanks ci!) --- src/apps/vectorwar/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/apps/vectorwar/main.cpp b/src/apps/vectorwar/main.cpp index b4581c6..59d378b 100644 --- a/src/apps/vectorwar/main.cpp +++ b/src/apps/vectorwar/main.cpp @@ -92,7 +92,6 @@ Syntax() MessageBox(NULL, L"Syntax: vectorwar.exe ('local' | :)*\n", L"Could not start", MB_OK); - exit(1); } int APIENTRY wWinMain(_In_ HINSTANCE hInstance, @@ -126,12 +125,14 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, int num_players = _wtoi(__wargv[offset++]); if (num_players < 0 || __argc < offset + num_players) { Syntax(); + return 1; } if (wcscmp(__wargv[offset], L"spectate") == 0) { char host_ip[128]; unsigned short host_port; if (swscanf_s(__wargv[offset+1], L"%[^:]:%hu", wide_ip_buffer, wide_ip_buffer_size, &host_port) != 2) { Syntax(); + return 1; } wcstombs_s(nullptr, host_ip, ARRAYSIZE(host_ip), wide_ip_buffer, _TRUNCATE); VectorWar_InitSpectator(hwnd, local_port, num_players, host_ip, host_port);