From b24ea1fc83d489e4eb6427c28eed24b0563e5570 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 5 Feb 2020 16:09:53 +0100 Subject: [PATCH] src/main.cpp: fix bug in command line parsing for search. loop should check for `argc - 1` (first param is program name) --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 8da1547..22e56d6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -138,7 +138,7 @@ int main(int argc, char **argv) { if (!strcmp(argv[p], "search")) { - while(p++ < argc) { + while(p++ < argc - 1) { if (!strcmp(argv[p], "--l33t")) { option_l33t = true; } else if (!memcmp(argv[p], "--threads=", 10)) {