From 37d00cceda58cda08f6206bff7309aaa7ba45e6e Mon Sep 17 00:00:00 2001 From: comex Date: Wed, 22 Apr 2015 23:17:09 -0400 Subject: [PATCH] Fix wx bullshit which made the watch view assert on my machine. 1) Apparently wxString::Format is type safe, and passing a u32 to it with the format "%lu" crashes with a meaningless assertion failure. Sure, it's the wrong type, but the error sure doesn't help... 2) "A MenuItem ID of Zero does not work under Mac". Thanks for the helpful assert message, no thanks for making your construct have random platform-specific differences for no reason (it's not like menu item IDs directly correspond to a part of Cocoa's menu API like they do on Win32). --- Source/Core/DolphinWX/Debugger/WatchView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinWX/Debugger/WatchView.cpp b/Source/Core/DolphinWX/Debugger/WatchView.cpp index a63676426a..293744d457 100644 --- a/Source/Core/DolphinWX/Debugger/WatchView.cpp +++ b/Source/Core/DolphinWX/Debugger/WatchView.cpp @@ -25,7 +25,7 @@ enum { - IDM_DELETEWATCH, + IDM_DELETEWATCH = 1, IDM_ADDMEMCHECK, IDM_VIEWMEMORY, }; @@ -98,7 +98,7 @@ static wxString GetValueByRowCol(int row, int col) case 0: return wxString::Format("%s", GetWatchName(row)); case 1: return wxString::Format("%08x", GetWatchAddr(row)); case 2: return wxString::Format("%08x", GetWatchValue(row)); - case 3: return wxString::Format("%lu", GetWatchValue(row)); + case 3: return wxString::Format("%u", GetWatchValue(row)); case 4: { u32 addr = GetWatchAddr(row);