mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 12:21:18 +00:00
Enforce upper bound on application tid range
This commit is contained in:
parent
1d0efbf456
commit
6027ff243d
3 changed files with 5 additions and 4 deletions
|
@ -368,7 +368,7 @@ Result Utils::SaveSdFileForAtmosphere(u64 title_id, const char *fn, void *data,
|
|||
}
|
||||
|
||||
bool Utils::IsHblTid(u64 tid) {
|
||||
return (g_override_any_app && tid >= 0x0100000000010000ULL) || (!g_override_any_app && tid == g_override_hbl_tid);
|
||||
return (g_override_any_app && IsApplicationTid(tid)) || (!g_override_any_app && tid == g_override_hbl_tid);
|
||||
}
|
||||
|
||||
bool Utils::HasTitleFlag(u64 tid, const char *flag) {
|
||||
|
@ -447,7 +447,7 @@ Result Utils::GetKeysDown(u64 *keys) {
|
|||
}
|
||||
|
||||
bool Utils::HasOverrideButton(u64 tid) {
|
||||
if (tid < 0x0100000000010000ULL || !IsSdInitialized()) {
|
||||
if ((!IsApplicationTid(tid)) || (!IsSdInitialized())) {
|
||||
/* Disable button override disable for non-applications. */
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit fb12edcbbaa5ef7a08fbb44d4aa13f0f37136537
|
||||
Subproject commit a2c74f8cd5311f8050bcc5ea7d07b1ba4b697558
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#include <cstring>
|
||||
#include <switch.h>
|
||||
#include <stratosphere.hpp>
|
||||
#include <strings.h>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
@ -309,7 +310,7 @@ void ContentManagement::TryMountSdCard() {
|
|||
}
|
||||
|
||||
bool ContentManagement::ShouldReplaceWithHBL(u64 tid) {
|
||||
return g_mounted_hbl_nsp && ((g_override_any_app && tid >= 0x0100000000010000) || (!g_override_any_app && tid == g_override_hbl_tid));
|
||||
return g_mounted_hbl_nsp && ((g_override_any_app && IsApplicationTid(tid)) || (!g_override_any_app && tid == g_override_hbl_tid));
|
||||
}
|
||||
|
||||
bool ContentManagement::ShouldOverrideContents(u64 tid) {
|
||||
|
|
Loading…
Reference in a new issue