Skip to content

Commit

Permalink
Fix REMethodDefinition::get_return_type when TDB_VER >= 69 (RE8)
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Aug 10, 2021
1 parent 55a9e54 commit 7ebe3fa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/sdk/RETypeDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,15 @@ sdk::RETypeDefinition* REMethodDefinition::get_return_type() const {

#if TDB_VER >= 69
auto param_ids = tdb->get_data<REParamList>(this->params);
const auto return_typeid = param_ids->returnType;

const auto return_param_id = param_ids->returnType;
const auto& p = (*tdb->params)[return_param_id];

if (p.type_id == 0) {
return nullptr;
}

const auto return_typeid = p.type_id;
#else
const auto return_typeid = (uint32_t)this->return_typeid;
#endif
Expand Down

0 comments on commit 7ebe3fa

Please sign in to comment.