Skip to content

Commit 340e2e7

Browse files
committed
wrappers: Fix the comparison against max_args in clang-target-wrapper
Since we allocate max_args+1 elements, with one extra for the null terminator, it's ok if we've used up to max_args elements already.
1 parent 9de1bfe commit 340e2e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wrappers/clang-target-wrapper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ int _tmain(int argc, TCHAR* argv[]) {
113113
}
114114

115115
exec_argv[arg] = NULL;
116-
if (arg >= max_arg) {
116+
if (arg > max_arg) {
117117
fprintf(stderr, "Too many options added\n");
118118
abort();
119119
}

0 commit comments

Comments
 (0)