fabric-samples/token-erc-20/chaincode-go
yjwxfq 9a4920d565 Update token_contract.go, modify the overflow judgment condition for function sub().
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>
2023-06-20 12:21:41 -04:00
..
chaincode Update token_contract.go, modify the overflow judgment condition for function sub(). 2023-06-20 12:21:41 -04:00
go.mod Update Go and Go dependencies (#996) 2023-03-07 14:44:33 +00:00
go.sum Update Go and Go dependencies (#996) 2023-03-07 14:44:33 +00:00
token_erc_20.go Rename token-account-based Directory to token-erc-20 2020-11-21 11:08:18 -05:00