Fix off-by-one error.
This commit is contained in:
parent
e880667b92
commit
b2bbe750a9
@ -94,7 +94,7 @@ main(int argc, char *argv[])
|
||||
void
|
||||
addarg(const char *item)
|
||||
{
|
||||
if (nargs + 1 > cargs) {
|
||||
if (nargs + 1 >= cargs) {
|
||||
cargs += 16;
|
||||
if ((args = realloc(args, sizeof(*args) * cargs)) == NULL)
|
||||
err(1, "malloc");
|
||||
|
Loading…
x
Reference in New Issue
Block a user