From 80118d29a7a280eb7ed5041eb7993a2dd44612d0 Mon Sep 17 00:00:00 2001 From: Username404 Date: Tue, 28 Sep 2021 21:51:51 +0200 Subject: [PATCH] Start iterating on arguments at 1 since argv[0] is the executable's path --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index bf062ba..544c13d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -16,7 +16,7 @@ int main(int argc, char* argv[]) { bool newLines = true; set files; - for (signed int i = 0; i < argc; ++i) + for (signed int i = 1; i < argc; ++i) { const string_view currentArg (argv[i]); if ((argc == 2) && (currentArg == Argument("version"))) { cout << Yerbacon::getVersion() << endl; exit(EXIT_SUCCESS); }