diff options
Diffstat (limited to 'src/bundles.adb')
-rw-r--r-- | src/bundles.adb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bundles.adb b/src/bundles.adb index af11f37..a6e1472 100644 --- a/src/bundles.adb +++ b/src/bundles.adb @@ -56,7 +56,8 @@ package body Bundles is (This : in Bundle) return Natural is begin - return Rationals.Floor (Count_Papers (This) * This.Worth); + -- The number of votes under all normal circumstances should never exceed MAXINT + return Natural (Rationals.Floor (Count_Papers (This) * This.Worth)); end Count_Votes; @@ -78,7 +79,8 @@ package body Bundles is Papers : out Natural) is begin Papers := Count_Papers (This); - Votes := Rationals.Floor (Papers * This.Worth); + -- The number of votes under all normal circumstances should never exceed MAXINT + Votes := Natural (Rationals.Floor (Papers * This.Worth)); end Count_Both; |