提交 849560d4 编写于 作者: D Daniel Larimer

fix div by zero in cpu usage

上级 8e2ac45e
......@@ -332,7 +332,7 @@ int64_t resource_limits_manager::get_account_cpu_limit( const account_name& name
int64_t cpu_weight;
get_account_limits( name, unused, unused, cpu_weight );
if( cpu_weight < 0 ) {
if( cpu_weight < 0 || state.total_cpu_weight == 0 ) {
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册