Skip to content

Commit

Permalink
Check number of entries in op_tables
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Sep 10, 2019
1 parent 9fd0b74 commit fb08633
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/evmone/instructions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1378,6 +1378,8 @@ constexpr exec_fn_table op_tables[] = {
create_op_table_constantinople(), // Petersburg
create_op_table_istanbul(), // Istanbul
};
static_assert(sizeof(op_tables) / sizeof(op_tables[0]) > EVMC_MAX_REVISION,
"op table entry missing for an EVMC revision");
} // namespace

EVMC_EXPORT const exec_fn_table& get_op_table(evmc_revision rev) noexcept
Expand Down

0 comments on commit fb08633

Please sign in to comment.