From 613bbb514b1d7c776a653c9cbe0fe7e7c511dd2f Mon Sep 17 00:00:00 2001 From: "okbob@github.com" Date: Wed, 22 Apr 2020 20:16:44 +0200 Subject: [PATCH] positional arguments starts by one --- src/expr_walk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/expr_walk.c b/src/expr_walk.c index 6ca125f..41c1663 100644 --- a/src/expr_walk.c +++ b/src/expr_walk.c @@ -576,7 +576,7 @@ check_fmt_string(const char *fmt, { if (*cp == 's') { - int argn = argpos > 1 ? argpos : arg + 1; + int argn = argpos >= 1 ? argpos : arg + 1; /* this is usually called after format check, but better be safe*/ if (argn <= nargs)