From f53ea7e44f8c9ee6baf5bbb26d2174e41010e86b Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 24 Mar 2019 12:56:23 -0700 Subject: [PATCH] Debugger: Prevent saving a -1 sized func. --- Windows/Debugger/CtrlDisAsmView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Windows/Debugger/CtrlDisAsmView.cpp b/Windows/Debugger/CtrlDisAsmView.cpp index fdf4de758c..71fea8b4ac 100644 --- a/Windows/Debugger/CtrlDisAsmView.cpp +++ b/Windows/Debugger/CtrlDisAsmView.cpp @@ -979,8 +979,8 @@ void CtrlDisAsmView::onMouseUp(WPARAM wParam, LPARAM lParam, int button) std::string newname; truncate_cpy(name, g_symbolMap->GetLabelString(funcBegin).c_str()); if (InputBox_GetString(MainWindow::GetHInstance(), MainWindow::GetHWND(), L"New function name", name, newname)) { - g_symbolMap->SetLabelName(newname.c_str(),funcBegin); - u32 funcSize = g_symbolMap->GetFunctionSize(curAddress); + g_symbolMap->SetLabelName(newname.c_str(), funcBegin); + u32 funcSize = g_symbolMap->GetFunctionSize(funcBegin); MIPSAnalyst::RegisterFunction(funcBegin, funcSize, newname.c_str()); MIPSAnalyst::UpdateHashMap(); MIPSAnalyst::ApplyHashMap();