Skip to content

Commit b35d40b

Browse files
authored
Merge pull request #234 from jouae/fix_bug
Fix parsing arguments
2 parents 29d90ea + d5f0495 commit b35d40b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

console.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ static char **parse_args(char *line, int *argcp)
144144
*dst++ = c;
145145
}
146146
}
147+
/* Let the last substring is null-terminated */
148+
*dst++ = '\0';
147149

148150
/* Now assemble into array of strings */
149151
char **argv = calloc_or_fail(argc, sizeof(char *), "parse_args");

0 commit comments

Comments
 (0)