From d3e9a906aaa1b992892ecc452371a5c3dc706170 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Fri, 16 Jul 2010 10:33:54 +0000 Subject: [PATCH] Use %ld for both wxFileOffset (off_t) and GetTicks() (time_t), also coalesce into a single wxString::Format. This fixes an assert in wx trunk. Unfortunatly it does not fix audio loading due to seperate breakage of libass in r4630:4631. closes #1228. Originally committed to SVN as r4681. --- aegisub/src/ffmpegsource_common.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aegisub/src/ffmpegsource_common.cpp b/aegisub/src/ffmpegsource_common.cpp index 71087285d..3f24fd848 100644 --- a/aegisub/src/ffmpegsource_common.cpp +++ b/aegisub/src/ffmpegsource_common.cpp @@ -229,9 +229,9 @@ wxString FFmpegSourceProvider::GetCacheFilename(const wxString& _filename) wxFileName filename(_filename); - // Generate string to be hashed - wxString toHash = filename.GetFullName() + wxString::Format(_T(":%i"),len) - + wxString::Format(_T(":%i"), filename.GetModificationTime().GetTicks()); + // Generate string to be hashed // + wxString toHash = wxString::Format(_T("%s %ld %ld"), filename.GetFullName(), len, filename.GetModificationTime().GetTicks()); + // Get the MD5 digest of the string const wchar_t *tmp = toHash.wc_str();