From 3c5aa45669855bf17e85ec24bd4de8e0ad8c9177 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Fri, 20 Mar 2020 11:47:19 -0700 Subject: [PATCH] fs: fix bugs with external code filesystems --- libstratosphere/source/fs/fs_code.cpp | 1 + libvapours/include/vapours/util/util_bounded_map.hpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/libstratosphere/source/fs/fs_code.cpp b/libstratosphere/source/fs/fs_code.cpp index 6aaa7dd6..e6d10aef 100644 --- a/libstratosphere/source/fs/fs_code.cpp +++ b/libstratosphere/source/fs/fs_code.cpp @@ -241,6 +241,7 @@ namespace ams::fs { R_TRY(OpenSdCardCodeOrCodeFileSystemImpl(std::addressof(fsa), path, program_id)); this->code_fs.emplace(std::move(fsa), program_id, is_specific); + this->program_id = program_id; this->initialized = true; return ResultSuccess(); diff --git a/libvapours/include/vapours/util/util_bounded_map.hpp b/libvapours/include/vapours/util/util_bounded_map.hpp index b0d2b7c2..41f7593c 100644 --- a/libvapours/include/vapours/util/util_bounded_map.hpp +++ b/libvapours/include/vapours/util/util_bounded_map.hpp @@ -116,7 +116,6 @@ namespace ams::util { /* Find a free value. */ for (size_t i = 0; i < N; i++) { - this->keys[i] = key; if (!this->keys[i]) { this->keys[i] = key; new (GetPointer(this->values[i])) Value(std::forward(args)...);