From f9e8175cb8d5642aae1ef4fd201a82f647d62a53 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 30 Nov 2011 02:38:42 +0000 Subject: [PATCH] Fix wxString::Format assertion failures in 64-bit builds Originally committed to SVN as r5943. --- aegisub/src/dialog_translation.cpp | 4 +++- aegisub/src/menu.cpp | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/aegisub/src/dialog_translation.cpp b/aegisub/src/dialog_translation.cpp index 6994b9d3e..41baf598f 100644 --- a/aegisub/src/dialog_translation.cpp +++ b/aegisub/src/dialog_translation.cpp @@ -41,6 +41,8 @@ #include "video_context.h" #ifndef AGI_PRE +#include + #include #include #include @@ -205,7 +207,7 @@ bool DialogTranslation::PrevBlock() { } void DialogTranslation::UpdateDisplay() { - line_number_display->SetLabel(wxString::Format(_("Current line: %d/%d"), line_number, line_count)); + line_number_display->SetLabel(wxString::Format(_("Current line: %" PRIu64 "/%" PRIu64), line_number, line_count)); original_text->SetReadOnly(false); original_text->ClearAll(); diff --git a/aegisub/src/menu.cpp b/aegisub/src/menu.cpp index cef1de775..8be8902a0 100644 --- a/aegisub/src/menu.cpp +++ b/aegisub/src/menu.cpp @@ -38,6 +38,7 @@ #ifndef AGI_PRE #include +#include #include #include @@ -73,7 +74,7 @@ class MruMenu : public wxMenu { for (size_t i = GetMenuItemCount(); i < new_size; ++i) { if (i >= items.size()) { items.push_back(new wxMenuItem(this, MENU_ID_BASE + cmds->size(), "_")); - cmds->push_back(cmd::get(STD_STR(wxString::Format("recent/%s/%d", lagi_wxString(type).Lower(), i)))); + cmds->push_back(cmd::get(STD_STR(wxString::Format("recent/%s/%" PRIu64, lagi_wxString(type).Lower(), i)))); } Append(items[i]); }