# Fix edge case in cast between fn with varargs · gitcafe/zig

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

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

Visibility: public

Requested revision: 21932a0ef25a7055cd3c0850fa58c2fda2ba383b

Requested commit: 21932a0ef25a7055cd3c0850fa58c2fda2ba383b

Commit: 21932a0ef25a7055cd3c0850fa58c2fda2ba383b

Tree: bc154b72c1162381e4d0b560b43e68507b442997

Author: LemonBoy

Committer: LemonBoy

## Message

```
Fix edge case in cast between fn with varargs

* Prevent the next_param_index to become greater than the param_count
  one as it's expected by every other function.
* Fix a typo in a error message.

Closes #4381

```

## Parents

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

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