summaryrefslogtreecommitdiffstats
path: root/src/p_args_len.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/p_args_len.c3
1 files changed, 2 insertions, 1 deletions
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);
}