# Fix crash due to command line argument parsing · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/a4e506510b202685d859e366feeeb76e09252ba0)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: a4e506510b202685d859e366feeeb76e09252ba0

Requested commit: a4e506510b202685d859e366feeeb76e09252ba0

Commit: a4e506510b202685d859e366feeeb76e09252ba0

Tree: e0a64414ed217203ffa1fce54240fb37dffce066

Author: Matt Stancliff

Committer: Andrew Kelley

## Message

```
Fix crash due to command line argument parsing

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'.

```

## Parents

- [e3452ba21b978f8b675e90e3b580e325ae0e38a6](https://git.cafe/gitcafe/zig/commit/e3452ba21b978f8b675e90e3b580e325ae0e38a6?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/a4e506510b202685d859e366feeeb76e09252ba0?format=markdown)
