[Pkg-mono-svn-commits] [SCM] mono branch, master, updated. debian/2.4.2.3+dfsg-3-26-gd58775d

Mirco Bauer meebey at meebey.net
Sun Dec 13 18:52:57 UTC 2009


The following commit has been merged in the master branch:
commit d58775d460ebd54341fbe1f4d1e8e461b2c755db
Author: Mirco Bauer <meebey at meebey.net>
Date:   Sun Dec 13 19:51:51 2009 +0100

      * debian/fix_large_ranges_in_random_generator_r146995.dpatch:
        + Fix random numbers in large ranges.

diff --git a/debian/changelog b/debian/changelog
index 7f56676..9e63247 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -65,8 +65,10 @@ mono (2.4.3+dfsg-1~pre1) UNRELEASED; urgency=medium
     + Added lc tool.
   * debian/libmono-system-web2.0-cil.install:
     + Added new development symlinks.
+  * debian/fix_large_ranges_in_random_generator_r146995.dpatch:
+    + Fix random numbers in large ranges.
 
- -- Mirco Bauer <meebey at debian.org>  Sun, 13 Dec 2009 18:53:19 +0100
+ -- Mirco Bauer <meebey at debian.org>  Sun, 13 Dec 2009 19:50:09 +0100
 
 mono (2.4.2.3+dfsg-3) unstable; urgency=low
 
diff --git a/debian/patches/00list b/debian/patches/00list
index a566705..56b41bd 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -15,6 +15,7 @@ fix_mdoc_build
 fix_tuner_build
 fix_CreateDelegate_ArgumentException
 fix_DynamicMethod_restrictedSkipVisibility_r138886
+fix_large_ranges_in_random_generator_r146995
 disable_building_convert.exe
 disable_building_RabbitMQ.Client.dll
 disable_bug-80307_test
diff --git a/debian/patches/fix_large_ranges_in_random_generator_r146995.dpatch b/debian/patches/fix_large_ranges_in_random_generator_r146995.dpatch
new file mode 100755
index 0000000..cdf6b6a
--- /dev/null
+++ b/debian/patches/fix_large_ranges_in_random_generator_r146995.dpatch
@@ -0,0 +1,22 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fix_large_ranges_in_random_generator_r146995.dpatch by Mirco Bauer <meebey at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: 2009-11-26  Sebastien Pouliot  <sebastien at ximian.com>
+## DP:	* Random.cs: Fix case where the diff between min and max
+## DP:    is very large in Next(int,int). Fix bug #558593
+## DP:	  [Backport r146993]
+
+ at DPATCH@
+diff -urNad git~/mcs/class/corlib/System/Random.cs git/mcs/class/corlib/System/Random.cs
+--- git~/mcs/class/corlib/System/Random.cs	2009-10-26 21:44:45.000000000 +0100
++++ git/mcs/class/corlib/System/Random.cs	2009-12-13 19:49:47.000000000 +0100
+@@ -124,7 +124,7 @@
+ 			if (diff <= 1)
+ 				return minValue;
+ 
+-			return (int)(Sample () * diff) + minValue;
++			return (int)((uint)(Sample () * diff) + minValue);
+ 		}
+ 
+ 		public virtual void NextBytes (byte [] buffer)

-- 
mono



More information about the Pkg-mono-svn-commits mailing list