From f165808b1cb551cd86655268b8dfa4fb7dcd5eb7 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 10 Sep 2020 18:13:47 +0200 Subject: FIX --- src/p_args_len.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/p_args_len.c') diff --git a/src/p_args_len.c b/src/p_args_len.c index 3e5bfbf..e624b37 100644 --- a/src/p_args_len.c +++ b/src/p_args_len.c @@ -49,7 +49,8 @@ size_t terminate = p_meet_whitespace(word, ptr, mode); ptr++; } - ptr -= 1; + if (*ptr != C_NUL) + ptr -= 1; return (ptr - word); } -- cgit v1.2.3