From 20776b37be6ba25d29f68f5318719148d3c6cb8b Mon Sep 17 00:00:00 2001 From: Daniel Lim Wee Soong Date: Tue, 27 Mar 2018 23:37:36 +0800 Subject: [PATCH] Fix wrongly converted specifiers Sorry that was a lot in one go so some of them had some mistakes --- src/core/hle/applets/applet.cpp | 2 +- src/core/hle/kernel/hle_ipc.cpp | 4 ++-- src/core/hle/kernel/ipc.cpp | 2 +- src/core/hle/kernel/svc.cpp | 2 +- src/core/memory.cpp | 14 +++++++------- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/core/hle/applets/applet.cpp b/src/core/hle/applets/applet.cpp index d644a43d3..81227df76 100644 --- a/src/core/hle/applets/applet.cpp +++ b/src/core/hle/applets/applet.cpp @@ -82,7 +82,7 @@ std::shared_ptr Applet::Get(Service::APT::AppletId id) { static void AppletUpdateEvent(u64 applet_id, int cycles_late) { Service::APT::AppletId id = static_cast(applet_id); std::shared_ptr applet = Applet::Get(id); - ASSERT_MSG(applet != nullptr, "Applet doesn't exist! applet_id={:#X}", static_cast(id)); + ASSERT_MSG(applet != nullptr, "Applet doesn't exist! applet_id={:#08X}", static_cast(id)); applet->Update(); diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index 5f5885ad1..6c087dd86 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp @@ -154,7 +154,7 @@ ResultCode HLERequestContext::PopulateFromIncomingCommandBuffer(const u32_le* sr break; } default: - UNIMPLEMENTED_MSG("Unsupported handle translation: {:#X}", descriptor); + UNIMPLEMENTED_MSG("Unsupported handle translation: {:#010X}", descriptor); } } @@ -218,7 +218,7 @@ ResultCode HLERequestContext::WriteToOutgoingCommandBuffer(u32_le* dst_cmdbuf, P break; } default: - UNIMPLEMENTED_MSG("Unsupported handle translation: {:#X}", descriptor); + UNIMPLEMENTED_MSG("Unsupported handle translation: {:#010X}", descriptor); } } diff --git a/src/core/hle/kernel/ipc.cpp b/src/core/hle/kernel/ipc.cpp index fe3943c66..b390b7fbc 100644 --- a/src/core/hle/kernel/ipc.cpp +++ b/src/core/hle/kernel/ipc.cpp @@ -199,7 +199,7 @@ ResultCode TranslateCommandBuffer(SharedPtr src_thread, SharedPtr process = thread->owner_process; - ASSERT_MSG(process != nullptr, "Invalid parent process for thread={:#X}", thread_handle); + ASSERT_MSG(process != nullptr, "Invalid parent process for thread={:#010X}", thread_handle); *process_id = process->process_id; return RESULT_SUCCESS; diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 64e6fbb93..06cd2231d 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -46,7 +46,7 @@ static void MapPages(PageTable& page_table, u32 base, u32 size, u8* memory, Page u32 end = base + size; while (base != end) { - ASSERT_MSG(base < PAGE_TABLE_NUM_ENTRIES, "out of range mapping at {:#010X}", base); + ASSERT_MSG(base < PAGE_TABLE_NUM_ENTRIES, "out of range mapping at {:08X}", base); page_table.attributes[base] = type; page_table.pointers[base] = memory; @@ -58,22 +58,22 @@ static void MapPages(PageTable& page_table, u32 base, u32 size, u8* memory, Page } void MapMemoryRegion(PageTable& page_table, VAddr base, u32 size, u8* target) { - ASSERT_MSG((size & PAGE_MASK) == 0, "non-page aligned size: {:#010X}", size); - ASSERT_MSG((base & PAGE_MASK) == 0, "non-page aligned base: {:#010X}", base); + ASSERT_MSG((size & PAGE_MASK) == 0, "non-page aligned size: {:08X}", size); + ASSERT_MSG((base & PAGE_MASK) == 0, "non-page aligned base: {:08X}", base); MapPages(page_table, base / PAGE_SIZE, size / PAGE_SIZE, target, PageType::Memory); } void MapIoRegion(PageTable& page_table, VAddr base, u32 size, MMIORegionPointer mmio_handler) { - ASSERT_MSG((size & PAGE_MASK) == 0, "non-page aligned size: {:#010X}", size); - ASSERT_MSG((base & PAGE_MASK) == 0, "non-page aligned base: {:#010X}", base); + ASSERT_MSG((size & PAGE_MASK) == 0, "non-page aligned size: {:08X}", size); + ASSERT_MSG((base & PAGE_MASK) == 0, "non-page aligned base: {:08X}", base); MapPages(page_table, base / PAGE_SIZE, size / PAGE_SIZE, nullptr, PageType::Special); page_table.special_regions.emplace_back(SpecialRegion{base, size, mmio_handler}); } void UnmapRegion(PageTable& page_table, VAddr base, u32 size) { - ASSERT_MSG((size & PAGE_MASK) == 0, "non-page aligned size: {:#010X}", size); - ASSERT_MSG((base & PAGE_MASK) == 0, "non-page aligned base: {:#010X}", base); + ASSERT_MSG((size & PAGE_MASK) == 0, "non-page aligned size: {:08X}", size); + ASSERT_MSG((base & PAGE_MASK) == 0, "non-page aligned base: {:08X}", base); MapPages(page_table, base / PAGE_SIZE, size / PAGE_SIZE, nullptr, PageType::Unmapped); }