Skip to content

Commit 2e9f15e

Browse files
committed
[libc] Fix index into argument vector
1 parent a1af1de commit 2e9f15e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libc/utils/gpu/loader/Loader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void *copy_argument_vector(int argc, const char **argv, Allocator alloc) {
8585
}
8686

8787
// Ensure the vector is null terminated.
88-
reinterpret_cast<void **>(dev_argv)[argc + 1] = nullptr;
88+
reinterpret_cast<void **>(dev_argv)[argc] = nullptr;
8989
return dev_argv;
9090
}
9191

0 commit comments

Comments
 (0)