mirror of
https://github.com/open-goal/jak-project
synced 2026-08-21 23:00:45 -04:00
[decomp] collectables, fix float bug in a few files (#2082)
Fixes https://github.com/open-goal/jak-project/issues/1931 Also decompile collectables.gc
This commit is contained in:
@@ -812,10 +812,11 @@ void SimpleExpressionElement::update_from_stack_gpr_to_fpr(const Env& env,
|
||||
auto int_constant = get_goal_integer_constant(frm, env);
|
||||
if (int_constant && u64_valid_for_float_constant(*int_constant)) {
|
||||
float flt;
|
||||
|
||||
memcpy(&flt, &int_constant.value(), sizeof(float));
|
||||
result->push_back(pool.alloc_element<ConstantFloatElement>(flt));
|
||||
return;
|
||||
if (proper_float(flt)) {
|
||||
result->push_back(pool.alloc_element<ConstantFloatElement>(flt));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
// converting something else to an FPR, put an expression around it.
|
||||
|
||||
Reference in New Issue
Block a user