From 45933ed41766da5e08b59f970ff58df63eb18c8b Mon Sep 17 00:00:00 2001 From: zachir Date: Mon, 11 Mar 2024 01:59:34 -0500 Subject: Prints help msg when no args When no args are provided, even will now print the help message and return -1. --- src/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.c b/src/main.c index ecb79e8..e415020 100644 --- a/src/main.c +++ b/src/main.c @@ -58,6 +58,9 @@ int main(int argc, char **argv) { result = strtol(argv[i], &output, 10); value = true; } + } else { + printhelp(); + return ERR; } if (value) { if (result % 2 == 0) { -- cgit v1.2.3