From 67ffd0334b8428f395563c89fbdaa5f6233ea1e7 Mon Sep 17 00:00:00 2001 From: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com> Date: Thu, 12 Mar 2026 17:15:04 +0100 Subject: [PATCH] Properly fix game flag handling (#4119) * fix the fix for the fix * fine there's no debug info then because of Ubuntu things --- src/main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 3370901a8..d2804ee62 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -99,7 +99,6 @@ int main(int argc, char* argv[]) { const auto& extras = app.remaining(); if (!extras.empty()) { gameArgs = extras; - gameArgs.erase(gameArgs.begin()); } }); @@ -143,6 +142,14 @@ int main(int argc, char* argv[]) { return 1; } } + if (!gameArgs.empty()) { + if (gameArgs.front() == "--") { + gameArgs.erase(gameArgs.begin()); + } else { + std::cerr << "Error: unhandled flags\n"; + return 1; + } + } // ---- Apply flags ---- if (patchFile)