Skip to content

Commit

Permalink
fix a bug where generating the pence amount for a donation always cam…
Browse files Browse the repository at this point in the history
…e out as 0
  • Loading branch information
adrianbanks committed Dec 2, 2011
1 parent bce77c9 commit 7f962fc
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -78,12 +78,12 @@ private decimal GenerateAmount()
// chance that it's a quarter, half or three quarters
if (random.Percent(50))
{
penceAmount = random.NextInt(4) / 4;
penceAmount = Convert.ToInt32((random.NextInt(4) / 4.0) * 100);
}
else
{
// random from .01 to 0.99
penceAmount = random.NextInt(100) / 100;
penceAmount = random.NextInt(100);
}
}

Expand Down

0 comments on commit 7f962fc

Please sign in to comment.