diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-12-09 19:38:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-09 19:38:39 +0100 |
commit | 5646e313a02fa4d5a222bfd74ad0fb5badae2ef2 (patch) | |
tree | bcdf9b5954c0fba2accecb28d5b8c516adaea985 | |
parent | Merge pull request #12319 from t895/refresh-list-bug (diff) | |
parent | debug: fix reading of module names (diff) | |
download | yuzu-5646e313a02fa4d5a222bfd74ad0fb5badae2ef2.tar yuzu-5646e313a02fa4d5a222bfd74ad0fb5badae2ef2.tar.gz yuzu-5646e313a02fa4d5a222bfd74ad0fb5badae2ef2.tar.bz2 yuzu-5646e313a02fa4d5a222bfd74ad0fb5badae2ef2.tar.lz yuzu-5646e313a02fa4d5a222bfd74ad0fb5badae2ef2.tar.xz yuzu-5646e313a02fa4d5a222bfd74ad0fb5badae2ef2.tar.zst yuzu-5646e313a02fa4d5a222bfd74ad0fb5badae2ef2.zip |
-rw-r--r-- | src/core/arm/debug.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/arm/debug.cpp b/src/core/arm/debug.cpp index 1fe37b8ee..af1c34bc3 100644 --- a/src/core/arm/debug.cpp +++ b/src/core/arm/debug.cpp @@ -282,6 +282,8 @@ Loader::AppLoader::Modules FindModules(const Kernel::KProcess* process) { // Ignore leading directories. char* path_pointer = module_path.path.data(); + char* path_end = + path_pointer + std::min(PathLengthMax, module_path.path_length); for (s32 i = 0; i < std::min(PathLengthMax, module_path.path_length) && module_path.path[i] != '\0'; @@ -292,7 +294,8 @@ Loader::AppLoader::Modules FindModules(const Kernel::KProcess* process) { } // Insert output. - modules.emplace(svc_mem_info.base_address, path_pointer); + modules.emplace(svc_mem_info.base_address, + std::string_view(path_pointer, path_end)); } } } |