Fix wxString::Format assertion failures in 64-bit builds

Originally committed to SVN as r5943.
This commit is contained in:
Thomas Goyne 2011-11-30 02:38:42 +00:00
parent a47f51080c
commit f9e8175cb8
2 changed files with 5 additions and 2 deletions

View file

@ -41,6 +41,8 @@
#include "video_context.h"
#ifndef AGI_PRE
#include <inttypes.h>
#include <wx/checkbox.h>
#include <wx/msgdlg.h>
#include <wx/sizer.h>
@ -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();

View file

@ -38,6 +38,7 @@
#ifndef AGI_PRE
#include <deque>
#include <inttypes.h>
#include <sstream>
#include <vector>
@ -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]);
}