From 2703e17f69053787b7322da60d884642466430b1 Mon Sep 17 00:00:00 2001 From: pottzman Date: Sat, 2 Sep 2023 23:51:08 +1000 Subject: [PATCH] Update cli.cpp --- src/cli.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cli.cpp b/src/cli.cpp index bf1b169..80fe38f 100644 --- a/src/cli.cpp +++ b/src/cli.cpp @@ -165,9 +165,10 @@ int CLI::parseCommandLine(int argc, char* argv[], Options* options) { } else if (arg == "-m" || arg == "--mode") { std::string mode = argv[i+1]; char *p = &mode[0]; - for (int i = 0; *p; i++) { - *p+i = toupper((unsigned char)*p+i); + for (; *p; p++) { + *p = toupper((unsigned char)*p); } + p = &mode[0]; if (strcmp(p, "WINDOWS") == 0) { options->activationMode = WINDOWS; } else if (strcmp(p, "OFFICEXP") == 0) {