mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
The general overflow judgment condition for function sub is not in every case. The judgment result is wrong in the condition of b < 0 && q >=0 for example, b = -3, q = 2, diff = -5, it's not overflow, but if (diff > b) == (b >= 0 && q >= 0) wil be true. for another example, b = -3, q = maxint, b-q is overflow, but if (diff > b) == (b >= 0 && q >= 0) wil be false. Signed-off-by: yjwxfq <112159687+yjwxfq@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| chaincode | ||
| go.mod | ||
| go.sum | ||
| token_erc_20.go | ||