Fix integer overflow issue.
authorCryptoManiac <balthazar.ad@gmail.com>
Fri, 4 Sep 2015 13:20:10 +0000 (16:20 +0300)
committerCryptoManiac <balthazar.ad@gmail.com>
Fri, 4 Sep 2015 13:20:10 +0000 (16:20 +0300)
Novacoin/StakeModifier.cs

index 7f45eb8..e6b6f50 100644 (file)
@@ -280,7 +280,7 @@ namespace Novacoin
                 }
 
                 // write the entropy bit of the selected block
-                nStakeModifierNew |= ((cursor.StakeEntropyBit) << nRound);
+                nStakeModifierNew |= (((long)cursor.StakeEntropyBit) << nRound);
 
                 // add the selected block from candidates to selected list
                 mapSelectedBlocks.Add(cursor.Hash, cursor);