未验证 提交 bfe93348 编写于 作者: B Bucky Kittinger 提交者: GitHub

used numeric_limits

上级 07c99711
......@@ -219,7 +219,7 @@ namespace eosio {
*/
asset& operator/=( int64_t a ) {
eosio_assert( a != 0, "divide by zero" );
eosio_assert( !(amount == LONG_MIN && a == -1), "signed division overflow" );
eosio_assert( !(amount == std::numeric_limits<int64_t>::min() && a == -1), "signed division overflow" );
amount /= a;
return *this;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册