mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-09-30 21:29:04 +00:00
SPU DisAsm: Force decimal point insertion for constant floats
This commit is contained in:
parent
edcc2a9e0d
commit
646ad3eed4
1 changed files with 8 additions and 0 deletions
|
@ -356,7 +356,15 @@ void comment_constant(std::string& last_opcode, u64 value, bool print_float = fa
|
|||
|
||||
if (std::isfinite(float_val))
|
||||
{
|
||||
const usz old_size = last_opcode.size();
|
||||
|
||||
fmt::append(last_opcode, " (%.6gf)", float_val);
|
||||
|
||||
if (usz pos = last_opcode.find_first_of('.', old_size); pos == umax)
|
||||
{
|
||||
// No decimal point has been inserted, force insertion
|
||||
last_opcode.insert(last_opcode.size() - 2, ".0"sv);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue