From 71968aa4f355fe0b2a73fc8f99df190449b8db00 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sun, 8 Jan 2012 01:04:16 +0000 Subject: [PATCH] Fix wxString::Format assertion failures in the stack walker Originally committed to SVN as r6203. --- aegisub/src/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aegisub/src/main.cpp b/aegisub/src/main.cpp index 8a355b9b8..1f88c19b8 100644 --- a/aegisub/src/main.cpp +++ b/aegisub/src/main.cpp @@ -446,16 +446,16 @@ void StackWalker::OnStackFrame(const wxStackFrame &frame) { if ((crash_text->IsOpened()) && (crash_xml->IsOpened())) { - wxString dst = wxString::Format("%03i - 0x%08X: ",frame.GetLevel(),frame.GetAddress()) + frame.GetName(); + wxString dst = wxString::Format("%03u - %p: ", (unsigned)frame.GetLevel(),frame.GetAddress()) + frame.GetName(); if (frame.HasSourceLocation()) - dst = wxString::Format("%s on %s:%d", dst, frame.GetFileName(), frame.GetLine()); + dst = wxString::Format("%s on %s:%u", dst, frame.GetFileName(), (unsigned)frame.GetLine()); crash_text->Write(wxString::Format("%s\n", dst)); - crash_xml->Write(wxString::Format(" \n", frame.GetLevel(), frame.GetAddress())); + crash_xml->Write(wxString::Format(" \n", (int)frame.GetLevel(), frame.GetAddress())); crash_xml->Write(wxString::Format(" %s\n", frame.GetName())); if (frame.HasSourceLocation()) - crash_xml->Write(wxString::Format(" %s\n", frame.GetLine(), frame.GetFileName())); + crash_xml->Write(wxString::Format(" %s\n", (unsigned)frame.GetLine(), frame.GetFileName())); crash_xml->Write(wxString::Format(" \n", frame.GetModule())); crash_xml->Write( " \n"); }