Fixed pair of bugs with float compare flag that cancelled each other out

This commit is contained in:
Mr-Wiseguy 2024-09-29 02:18:20 -04:00
parent 8aa8e6c426
commit f3f4a5cd73
2 changed files with 6 additions and 6 deletions

View file

@ -333,10 +333,10 @@ void N64Recomp::CGenerator::get_binary_expr_string(BinaryOpType type, const Bina
expr_string = fmt::format("{} {} {} ? 1 : 0", input_a, infix_string, input_b);
}
else if (type == BinaryOpType::Equal && operands.operands[1] == Operand::Zero && operands.operand_operations[1] == UnaryOpType::None) {
expr_string = input_a;
expr_string = "!" + input_a;
}
else if (type == BinaryOpType::NotEqual && operands.operands[1] == Operand::Zero && operands.operand_operations[1] == UnaryOpType::None) {
expr_string = "!" + input_a;
expr_string = input_a;
}
// End unnecessary cases.