mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow certain implicit conversions between integer types.
Disallow implicit conversion from ``uintN`` and ``intM`` when ``M > N``, and by extension, explicit conversion between the same types are also disallowed.
This commit is contained in:
@@ -61,7 +61,7 @@ contract ScalarEvent is Event {
|
||||
convertedWinningOutcome = OUTCOME_RANGE;
|
||||
// Map outcome to outcome range
|
||||
else
|
||||
convertedWinningOutcome = uint24(uint(OUTCOME_RANGE * (outcome - lowerBound) / (upperBound - lowerBound)));
|
||||
convertedWinningOutcome = uint24(uint(int(uint(OUTCOME_RANGE)) * (outcome - lowerBound) / (upperBound - lowerBound)));
|
||||
uint factorShort = OUTCOME_RANGE - convertedWinningOutcome;
|
||||
uint factorLong = OUTCOME_RANGE - factorShort;
|
||||
uint shortOutcomeTokenCount = outcomeTokens[SHORT].balanceOf(msg.sender);
|
||||
|
||||
Reference in New Issue
Block a user