From 5b658e77dfe84b6612a834e8461b2902c4913169 Mon Sep 17 00:00:00 2001 From: Sepalani Date: Thu, 7 Apr 2022 11:55:23 +0400 Subject: [PATCH] MemoryWidget: Fix preview of zero as float/double --- Source/Core/DolphinQt/Debugger/MemoryWidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinQt/Debugger/MemoryWidget.cpp b/Source/Core/DolphinQt/Debugger/MemoryWidget.cpp index a2f9c9bc03..d768f07324 100644 --- a/Source/Core/DolphinQt/Debugger/MemoryWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/MemoryWidget.cpp @@ -531,7 +531,7 @@ void MemoryWidget::ValidateAndPreviewInputValue() if (good) { const u32 hex_out = Common::BitCast(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(value_double); - hex_string = QString::fromStdString(fmt::format("{:X}", hex_out)); + hex_string = QString::fromStdString(fmt::format("{:016X}", hex_out)); } break; }