Euphoria Ticket #501: rand.e fails when lo/hi parameters are in wrong order and > 30 bits

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

Type: Bug Report Severity: Normal Category: Library Routine
Assigned To: jeremy Status: Fixed Reported Release: 3951
Fixed in SVN #: 4540, 4546, 4549 View VCS: 4540, 4546, 4549 Milestone: 4.0.0RC2

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.

Search



Quick Links

User menu

Not signed in.

Misc Menu