mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-06-05 14:45:04 -06:00
SPU DisAsm: Force decimal point insertion for constant floats
This commit is contained in:
parent
edcc2a9e0d
commit
646ad3eed4
@ -356,7 +356,15 @@ void comment_constant(std::string& last_opcode, u64 value, bool print_float = fa
|
|||||||
|
|
||||||
if (std::isfinite(float_val))
|
if (std::isfinite(float_val))
|
||||||
{
|
{
|
||||||
|
const usz old_size = last_opcode.size();
|
||||||
|
|
||||||
fmt::append(last_opcode, " (%.6gf)", float_val);
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user