Fix integer overflow issue.
[NovacoinLibrary.git] / 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);