Skip to content

Commit

Permalink
Fix get_active_producers in eosiolib #112
Browse files Browse the repository at this point in the history
  • Loading branch information
soft-bagel-93 committed Aug 29, 2019
1 parent 89ac514 commit 11f74a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libraries/eosiolib/eosiolib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ namespace eosio {
}

std::vector<name> get_active_producers() {
auto prod_cnt = get_active_producers(nullptr, 0)/8;
std::vector<name> active_prods(prod_cnt);
get_active_producers((uint64_t*)active_prods.data(), active_prods.size());
return active_prods;
auto buffer_size = get_active_producers(nullptr, 0);
std::vector<name> active_prods(buffer_size / sizeof(uint64_t));
get_active_producers((uint64_t*)active_prods.data(), buffer_size);
return active_prods;
}

} // namespace eosio

0 comments on commit 11f74a9

Please sign in to comment.