diff --git a/kwh-cost.c b/kwh-cost.c index e7aa237..8c4d79d 100644 --- a/kwh-cost.c +++ b/kwh-cost.c @@ -40,7 +40,7 @@ int parse_arguments(const int argc, const char *const *const argv, for (int i = 1, pos = 0; i < argc; ++i) if (argv[i][0] == '-') { size_t l = strlen(argv[i]); - if (l < 2) + if (l == 1) return 99; if (argv[i][1] == 'h' || (argv[i][1] == '-' && l > 2 && argv[i][2] == 'h')) return 1;