Skip to content

Commit

Permalink
Only check devilutionx.mpq version if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
glebm committed Aug 17, 2024
1 parent cfa6529 commit 51659c8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions Source/diablo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1142,11 +1142,7 @@ void SetApplicationVersions()

void CheckArchivesUpToDate()
{
#ifdef UNPACKED_MPQS
const bool devilutionxMpqOutOfDate = false;
#else
const bool devilutionxMpqOutOfDate = IsDevilutionXMpqOutOfDate();
#endif
const bool fontsMpqOutOfDate = AreExtraFontsOutOfDate();

if (devilutionxMpqOutOfDate && fontsMpqOutOfDate) {
Expand Down
2 changes: 1 addition & 1 deletion Source/init.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ inline bool IsDevilutionXMpqOutOfDate()
#ifdef UNPACKED_MPQS
return false;
#else
return !devilutionx_mpq.has_value() || IsDevilutionXMpqOutOfDate(*devilutionx_mpq);
return devilutionx_mpq.has_value() && IsDevilutionXMpqOutOfDate(*devilutionx_mpq);
#endif
}

Expand Down

0 comments on commit 51659c8

Please sign in to comment.