diff --git a/Src/Fare/Xeger.cs b/Src/Fare/Xeger.cs
index 5abbcb2..aaa63ae 100644
--- a/Src/Fare/Xeger.cs
+++ b/Src/Fare/Xeger.cs
@@ -83,10 +83,9 @@ public string Generate()
/// The object used as the randomizer.
/// A random number in the given range.
private static int GetRandomInt(int min, int max, Random random)
- {
- int dif = max - min;
- double number = random.NextDouble();
- return min + (int)Math.Round(number * dif);
+ {
+ int maxForRandom = max - min + 1;
+ return random.Next(maxForRandom) + min;
}
private void Generate(StringBuilder builder, State state)