aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/handle_table.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-12-04 12:23:19 -0500
committerGitHub <noreply@github.com>2018-12-04 12:23:19 -0500
commitda5659fb87bbcb0fd3f77679f2573476b0140860 (patch)
tree31fac2779ca1799a321445ebd2143a60b7d8647f /src/core/hle/kernel/handle_table.cpp
parent7f6bc284e9eb39653bfdfba0e988311f24f14b6b (diff)
parentac966e4213c4a60af01fa99eec8427674a569cf0 (diff)
Merge pull request #1857 from lioncash/res-info
kernel/svc: Implement the resource limit svcGetInfo option
Diffstat (limited to 'src/core/hle/kernel/handle_table.cpp')
-rw-r--r--src/core/hle/kernel/handle_table.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/kernel/handle_table.cpp b/src/core/hle/kernel/handle_table.cpp
index 1bf79b692..c8acde5b1 100644
--- a/src/core/hle/kernel/handle_table.cpp
+++ b/src/core/hle/kernel/handle_table.cpp
@@ -42,9 +42,10 @@ ResultVal<Handle> HandleTable::Create(SharedPtr<Object> obj) {
u16 generation = next_generation++;
// Overflow count so it fits in the 15 bits dedicated to the generation in the handle.
- // CTR-OS doesn't use generation 0, so skip straight to 1.
- if (next_generation >= (1 << 15))
+ // Horizon OS uses zero to represent an invalid handle, so skip to 1.
+ if (next_generation >= (1 << 15)) {
next_generation = 1;
+ }
generations[slot] = generation;
objects[slot] = std::move(obj);