# Fix index-of-out-bounds when no versions are found in the sdk lib dir · gitcafe/zig

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

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

Visibility: public

Requested revision: 65cad8ab1398667bdc401cbdfaabfcd9cc8459d8

Requested commit: 65cad8ab1398667bdc401cbdfaabfcd9cc8459d8

Commit: 65cad8ab1398667bdc401cbdfaabfcd9cc8459d8

Tree: ea15fa648a9bfd7e5d6c7371c85600eaa16614ee

Author: Ryan Liptak

Committer: Andrew Kelley

## Message

```
Fix index-of-out-bounds when no versions are found in the sdk lib dir

The current code wrongly assumes that versions[0] will always exist after the iterateAndFilterByVersion call.

```

## Parents

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

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