paladin-t / b8

BASIC8 - The Fantasy Computer/Console!
https://paladin-t.github.io/b8/
221 stars 15 forks source link

Index out of bounds error in "rnd" method #32

Closed JasonNumberThirteen closed 5 years ago

JasonNumberThirteen commented 5 years ago

I noticed that "rnd" method throws an error about "index out of bounds" when minimum and maximum range are the same. That was so confusing, I analyzed my code many times searching the reason, but I didn't knew this could be caused by single value in range. I don't know how can I call it, is it a bug, an issue or just a mistake, but for sure it shouldn't throw an error for this.

paladin-t commented 5 years ago

It's a feature, the max specifier should be greater than the min.