[decomp] fix joint type (#1827)

* fix joint type

* fix relocate hack bug

* update
This commit is contained in:
water111
2022-08-31 19:48:06 -04:00
committed by GitHub
parent d264779173
commit 937ae0cb97
10 changed files with 58 additions and 42 deletions
+3 -1
View File
@@ -1225,7 +1225,9 @@ void SimpleExpressionElement::update_from_stack_add_i(const Env& env,
auto& name = env.func->guessed_name;
if (name.kind == FunctionName::FunctionKind::METHOD && name.method_id == 7 &&
env.func->type.arg_count() == 3) {
if (env.dts->ts.tc(TypeSpec("structure"), arg0_type.typespec()) && (arg1_i || arg1_u)) {
if ((env.dts->ts.tc(TypeSpec("structure"), arg0_type.typespec()) ||
arg0_type.typespec().base_type() == "inline-array") &&
(arg1_i || arg1_u)) {
auto new_form = pool.alloc_element<GenericElement>(
GenericOperator::make_fixed(FixedOperatorKind::ADDITION_PTR), args.at(0), args.at(1));
result->push_back(new_form);