From c051ae333818954dbf056340b0fad8dddf5ecbff Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 4 Aug 2014 03:06:13 -0400 Subject: [PATCH] DolphinWX: Ensure the code view string vector is always a size of two. This way if any entries are not populated, then an empty string will be used. --- Source/Core/DolphinWX/Debugger/CodeView.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinWX/Debugger/CodeView.cpp b/Source/Core/DolphinWX/Debugger/CodeView.cpp index 7b18a5e9d8..80b5598dfc 100644 --- a/Source/Core/DolphinWX/Debugger/CodeView.cpp +++ b/Source/Core/DolphinWX/Debugger/CodeView.cpp @@ -478,9 +478,10 @@ void CCodeView::OnPaint(wxPaintEvent& event) { std::vector dis; SplitString(m_debugger->Disassemble(address), '\t', dis); + dis.resize(2); static const size_t VALID_BRANCH_LENGTH = 10; - const std::string& opcode = dis[0]; + const std::string& opcode = dis[0]; const std::string& operands = dis[1]; std::string desc;