diff options
author | Subv <subv2112@gmail.com> | 2018-02-17 19:56:21 +0100 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2018-02-17 20:01:01 +0100 |
commit | 416f692f6e1b8a4c838977b0cf6d9ae2ecbd15d6 (patch) | |
tree | f852ec3328473f214155234c3ad03e40b80768e2 /src/core/hle/service/nvdrv | |
parent | Parcel: Ensure we don't read past the end of the parcels in Vi. (diff) | |
download | yuzu-416f692f6e1b8a4c838977b0cf6d9ae2ecbd15d6.tar yuzu-416f692f6e1b8a4c838977b0cf6d9ae2ecbd15d6.tar.gz yuzu-416f692f6e1b8a4c838977b0cf6d9ae2ecbd15d6.tar.bz2 yuzu-416f692f6e1b8a4c838977b0cf6d9ae2ecbd15d6.tar.lz yuzu-416f692f6e1b8a4c838977b0cf6d9ae2ecbd15d6.tar.xz yuzu-416f692f6e1b8a4c838977b0cf6d9ae2ecbd15d6.tar.zst yuzu-416f692f6e1b8a4c838977b0cf6d9ae2ecbd15d6.zip |
Diffstat (limited to 'src/core/hle/service/nvdrv')
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvmap.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvmap.cpp b/src/core/hle/service/nvdrv/devices/nvmap.cpp index cd8c0c605..b3842eb4c 100644 --- a/src/core/hle/service/nvdrv/devices/nvmap.cpp +++ b/src/core/hle/service/nvdrv/devices/nvmap.cpp @@ -103,11 +103,8 @@ u32 nvmap::IocFromId(const std::vector<u8>& input, std::vector<u8>& output) { [&](const auto& entry) { return entry.second->id == params.id; }); ASSERT(itr != handles.end()); - // Make a new handle for the object - u32 handle = next_handle++; - handles[handle] = itr->second; - - params.handle = handle; + // Return the existing handle instead of creating a new one. + params.handle = itr->first; std::memcpy(output.data(), ¶ms, sizeof(params)); return 0; |