hyperledger / solang

Solidity Compiler for Solana and Polkadot
https://solang.readthedocs.io/
Apache License 2.0
1.25k stars 208 forks source link

Fix type(int256).min in comparisons #1527

Closed seanyoung closed 11 months ago

seanyoung commented 11 months ago

When resolving comparisons, we don't know what the types of the operands are so we resolve with ResolveTo::Unknown. In this path, there is an mistake in the bounds check for negative integers.

Fixes https://github.com/hyperledger/solang/issues/1523