Euphoria
Ticket #501:
rand.e fails when lo/hi parameters are in wrong order and > 30 bits
-
Reported by
DerekParnell
Dec 05, 2010
The temp variable should be an atom.
public function rand_range(atom lo, atom hi)
if lo > hi then
integer temp = hi
...
end function
Details
1. Comment by jeremy
Dec 05, 2010
Is there a test case that can be used to verify this and then the fix? I'd just change it to atom, but cannot confirm I fixed anything.
2. Comment by DerekParnell
Dec 05, 2010
Try this ...
? rand_range(0xFFFFFFFF, 0xFFFFFF00)
3. Comment by jeremy
Dec 05, 2010
Added test and fixed.