mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 17:30:17 +01:00
Fix file version checking bug.
Opening a 1.2.4 Audacity version would previously report an error, as being 'more recent' than 1.3.0. Found by whitebox testing.
This commit is contained in:
@@ -1452,7 +1452,10 @@ bool ProjectFileIO::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
|||||||
int crev;
|
int crev;
|
||||||
wxSscanf(wxT(AUDACITY_FILE_FORMAT_VERSION), wxT("%i.%i.%i"), &cver, &crel, &crev);
|
wxSscanf(wxT(AUDACITY_FILE_FORMAT_VERSION), wxT("%i.%i.%i"), &cver, &crel, &crev);
|
||||||
|
|
||||||
if (cver < fver || crel < frel || crev < frev)
|
int fileVer = ((fver *100)+frel)*100+frev;
|
||||||
|
int codeVer = ((cver *100)+crel)*100+crev;
|
||||||
|
|
||||||
|
if (codeVer<fileVer)
|
||||||
{
|
{
|
||||||
/* i18n-hint: %s will be replaced by the version number.*/
|
/* i18n-hint: %s will be replaced by the version number.*/
|
||||||
auto msg = XO("This file was saved using Audacity %s.\nYou are using Audacity %s. You may need to upgrade to a newer version to open this file.")
|
auto msg = XO("This file was saved using Audacity %s.\nYou are using Audacity %s. You may need to upgrade to a newer version to open this file.")
|
||||||
|
|||||||
Reference in New Issue
Block a user