diff --git a/src/tools.c b/src/tools.c index fbb4c4781..73335d21e 100644 --- a/src/tools.c +++ b/src/tools.c @@ -6504,13 +6504,13 @@ uint32_t parse_line(char *in, char *out, size_t *outlen, char **args, int *nbarg goto leave; } leave: - *nbargs = arg; - *outlen = outpos; - /* make sure empty lines are terminated */ if (!arg) EMIT_CHAR(0); + *nbargs = arg; + *outlen = outpos; + /* empty all trailing args by making them point to the trailing zero, * at least the last one in any case. */