aboutsummaryrefslogtreecommitdiff
path: root/src/core/arm/debug.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-12-09 13:38:39 -0500
committerGitHub <noreply@github.com>2023-12-09 13:38:39 -0500
commit974571ad2b49bf78b85f8754c0630509d749663c (patch)
treebcdf9b5954c0fba2accecb28d5b8c516adaea985 /src/core/arm/debug.cpp
parent6d0e20ed510d18aa40ec87bf572b6ec729775b71 (diff)
parente1b32b6c356afdb7cf4c1cc7b524c07d7d1aacf9 (diff)
Merge pull request #12320 from liamwhite/debug-fix
debug: fix reading of module names
Diffstat (limited to 'src/core/arm/debug.cpp')
-rw-r--r--src/core/arm/debug.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/arm/debug.cpp b/src/core/arm/debug.cpp
index 1fe37b8ee1..af1c34bc36 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));
}
}
}