[libc] Fix index into argument vector
This commit is contained in:
parent
a1af1de438
commit
2e9f15e1df
@ -85,7 +85,7 @@ void *copy_argument_vector(int argc, const char **argv, Allocator alloc) {
|
||||
}
|
||||
|
||||
// Ensure the vector is null terminated.
|
||||
reinterpret_cast<void **>(dev_argv)[argc + 1] = nullptr;
|
||||
reinterpret_cast<void **>(dev_argv)[argc] = nullptr;
|
||||
return dev_argv;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user