[Mono-bugs] [Bug 79858][Wis] Changed - Random.Next() returns negative numbers

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Nov 7 07:02:00 EST 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by atsushi at ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=79858

--- shadow/79858	2006-11-07 06:48:12.000000000 -0500
+++ shadow/79858.tmp.11400	2006-11-07 07:01:59.000000000 -0500
@@ -71,6 +71,11 @@
 But x % 2 can't be -1 !
 Why this ?
 If it would be so because of we get out of integer boundaries,
 I would expect I at least an exception to be thrown, no ?
 
 
+
+------- Additional Comments From atsushi at ximian.com  2006-11-07 07:01 -------
+You are right on the doubt that it would be because of overflow. To
+get overflow exception, you need explicit "checked" statement to
+surround the overflown block (but you wouldn't really want it here).


More information about the mono-bugs mailing list