# Fix the start-less-than-end assertion in std.rand.Random.range \(\#1325\) · gitcafe/zig

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

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

Visibility: public

Requested revision: c2a08d7c516899b4c794bd6c3fc07ddb22d5876a

Requested commit: c2a08d7c516899b4c794bd6c3fc07ddb22d5876a

Commit: c2a08d7c516899b4c794bd6c3fc07ddb22d5876a

Tree: d5c286e30ac12b3c4d775c3c4a830b4f2bb1da79

Author: Matthew D\. Steele

Committer: Andrew Kelley

## Message

```
Fix the start-less-than-end assertion in std.rand.Random.range (#1325)

The function returns a value in [start, end), but was asserting
start <= end instead of start < end.  With this fix, range(1, 1)
will now assertion error instead of dividing by zero.
```

## Parents

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

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