diff --git a/src/util.c b/src/util.c index e6689152..9e95e8f8 100644 --- a/src/util.c +++ b/src/util.c @@ -170,7 +170,7 @@ char *sanitize(char *arg, size_t len) { size_t i = 0; - while (isallowed(arg[i]) && i < len) + while (i < len && isallowed(arg[i])) i++; if (i + 1 < len) {