1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-26 13:52:21 +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
const MinimumProgramVersion *entries = nullptr;
size_t num_entries = 0;
switch (hos::GetVersion()) {
case hos::Version_8_1_0:
entries = g_MinimumProgramVersions810;
num_entries = g_MinimumProgramVersionsCount810;
break;
case hos::Version_9_0_0:
entries = g_MinimumProgramVersions900;
num_entries = g_MinimumProgramVersionsCount900;
break;
case hos::Version_9_1_0:
entries = g_MinimumProgramVersions910;
num_entries = g_MinimumProgramVersionsCount910;
break;
case hos::Version_10_0_0:
entries = g_MinimumProgramVersions1000;
num_entries = g_MinimumProgramVersionsCount1000;
break;
default:
entries = nullptr;
num_entries = 0;
break;
const auto hos_version = hos::GetVersion();
if (hos_version >= hos::Version_10_0_0) {
entries = g_MinimumProgramVersions1000;
num_entries = g_MinimumProgramVersionsCount1000;
} else if (hos_version >= hos::Version_9_1_0) {
entries = g_MinimumProgramVersions910;
num_entries = g_MinimumProgramVersionsCount910;
} else if (hos_version >= hos::Version_9_0_0) {
entries = g_MinimumProgramVersions900;
num_entries = g_MinimumProgramVersionsCount900;
} else if (hos_version >= hos::Version_8_1_0) {
entries = g_MinimumProgramVersions810;
num_entries = g_MinimumProgramVersionsCount810;
}
for (size_t i = 0; i < num_entries; i++) {