1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-13 23:46:40 +00:00

loader: correct anti-downgrade tables for new version scheme

This commit is contained in:
Michael Scire 2020-05-06 22:39:11 -07:00
parent 0e289461bb
commit 17b6bcfd37

View file

@ -94,27 +94,20 @@ namespace ams::ldr {
#ifdef LDR_VALIDATE_PROCESS_VERSION #ifdef LDR_VALIDATE_PROCESS_VERSION
const MinimumProgramVersion *entries = nullptr; const MinimumProgramVersion *entries = nullptr;
size_t num_entries = 0; size_t num_entries = 0;
switch (hos::GetVersion()) {
case hos::Version_8_1_0: const auto hos_version = hos::GetVersion();
entries = g_MinimumProgramVersions810; if (hos_version >= hos::Version_10_0_0) {
num_entries = g_MinimumProgramVersionsCount810; entries = g_MinimumProgramVersions1000;
break; num_entries = g_MinimumProgramVersionsCount1000;
case hos::Version_9_0_0: } else if (hos_version >= hos::Version_9_1_0) {
entries = g_MinimumProgramVersions900; entries = g_MinimumProgramVersions910;
num_entries = g_MinimumProgramVersionsCount900; num_entries = g_MinimumProgramVersionsCount910;
break; } else if (hos_version >= hos::Version_9_0_0) {
case hos::Version_9_1_0: entries = g_MinimumProgramVersions900;
entries = g_MinimumProgramVersions910; num_entries = g_MinimumProgramVersionsCount900;
num_entries = g_MinimumProgramVersionsCount910; } else if (hos_version >= hos::Version_8_1_0) {
break; entries = g_MinimumProgramVersions810;
case hos::Version_10_0_0: num_entries = g_MinimumProgramVersionsCount810;
entries = g_MinimumProgramVersions1000;
num_entries = g_MinimumProgramVersionsCount1000;
break;
default:
entries = nullptr;
num_entries = 0;
break;
} }
for (size_t i = 0; i < num_entries; i++) { for (size_t i = 0; i < num_entries; i++) {