Skip to content

Commit

Permalink
replace lua_get with check_param
Browse files Browse the repository at this point in the history
  • Loading branch information
edo9300 committed Mar 7, 2024
1 parent c2093bd commit c33b14e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libduel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2350,7 +2350,7 @@ LUA_STATIC_FUNCTION(SelectCardsFromCodes) {
auto min = lua_get<uint16_t>(L, 2);
auto max = lua_get<uint16_t>(L, 3);
bool cancelable = lua_get<bool>(L, 4);
/*bool ret_index = */(void)lua_get<bool>(L, 5);
check_param<LuaParam::BOOLEAN>(L, 5);
lua_iterate_table_or_stack(L, 6, lua_gettop(L), [L, &select_codes = pduel->game_field->core.select_cards_codes]{
select_codes.emplace_back(lua_get<uint32_t>(L, -1), static_cast<uint32_t>(select_codes.size() + 1));
});
Expand Down

0 comments on commit c33b14e

Please sign in to comment.