From 672842c923f03070e45d3fdfa5c26a1c604994dc Mon Sep 17 00:00:00 2001 From: Rudi Date: Mon, 5 Oct 2020 02:35:42 +0000 Subject: [PATCH] Allow positional arg for game_csv if it is the only arg --- Game.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Game.cpp b/Game.cpp index 8505ef7..7838574 100755 --- a/Game.cpp +++ b/Game.cpp @@ -29,6 +29,9 @@ int main(int argc, char **argv) { // Initialize nextLevel to 0 (load first level) int next_level = 0; game_csv = "/sys/sdf/share/csvgame/story.csv"; + if (argc == 2) { + game_csv = string(argv[1]); + } for (int i = 1; i < argc; i++) { string test_arg = string(argv[i]); if (test_arg == "-f") {