Merge pull request #10567 from sepalani/fix-float-preview

MemoryWidget: Fix preview of zero as float/double
This commit is contained in:
Admiral H. Curtiss 2022-04-07 14:41:01 +02:00 committed by GitHub
commit 38bf2826f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -531,7 +531,7 @@ void MemoryWidget::ValidateAndPreviewInputValue()
if (good)
{
const u32 hex_out = Common::BitCast<u32>(value_float);
hex_string = QString::fromStdString(fmt::format("{:X}", hex_out));
hex_string = QString::fromStdString(fmt::format("{:08X}", hex_out));
}
break;
}
@ -542,7 +542,7 @@ void MemoryWidget::ValidateAndPreviewInputValue()
if (good)
{
const u64 hex_out = Common::BitCast<u64>(value_double);
hex_string = QString::fromStdString(fmt::format("{:X}", hex_out));
hex_string = QString::fromStdString(fmt::format("{:016X}", hex_out));
}
break;
}