| author | |
| committer | |
| log | a4e506510b202685d859e366feeeb76e09252ba0 |
| tree | e0a64414ed217203ffa1fce54240fb37dffce066 |
| parent | e3452ba21b978f8b675e90e3b580e325ae0e38a6 |
zig --help -> ok
zig --help --c-source -> ok
zig --c-source --help -> crash [fixed]
'i' was being incremented without regard for the 'argc' limit, so
we were running off the end of 'argv'.1 files changed, 5 insertions(+), 1 deletions(-)
src/main.cpp+5-1| ... | ... | @@ -755,7 +755,11 @@ int main(int argc, char **argv) { |
| 755 | 755 | if (argv[i][0] == '-') { |
| 756 | 756 | c_file->args.append(argv[i]); |
| 757 | 757 | i += 1; |
| 758 | continue; | |
| 758 | if (i < argc) { | |
| 759 | continue; | |
| 760 | } | |
| 761 | ||
| 762 | break; | |
| 759 | 763 | } else { |
| 760 | 764 | c_file->source_path = argv[i]; |
| 761 | 765 | c_source_files.append(c_file); |