summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar liamwhite2023-12-09 13:38:39 -0500
committerGravatar GitHub2023-12-09 13:38:39 -0500
commit5646e313a02fa4d5a222bfd74ad0fb5badae2ef2 (patch)
treebcdf9b5954c0fba2accecb28d5b8c516adaea985 /src
parentMerge pull request #12319 from t895/refresh-list-bug (diff)
parentdebug: fix reading of module names (diff)
downloadyuzu-5646e313a02fa4d5a222bfd74ad0fb5badae2ef2.tar.gz
yuzu-5646e313a02fa4d5a222bfd74ad0fb5badae2ef2.tar.xz
yuzu-5646e313a02fa4d5a222bfd74ad0fb5badae2ef2.zip
Merge pull request #12320 from liamwhite/debug-fix
debug: fix reading of module names
Diffstat (limited to 'src')
-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 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) {
282 282
283 // Ignore leading directories. 283 // Ignore leading directories.
284 char* path_pointer = module_path.path.data(); 284 char* path_pointer = module_path.path.data();
285 char* path_end =
286 path_pointer + std::min(PathLengthMax, module_path.path_length);
285 287
286 for (s32 i = 0; i < std::min(PathLengthMax, module_path.path_length) && 288 for (s32 i = 0; i < std::min(PathLengthMax, module_path.path_length) &&
287 module_path.path[i] != '\0'; 289 module_path.path[i] != '\0';
@@ -292,7 +294,8 @@ Loader::AppLoader::Modules FindModules(const Kernel::KProcess* process) {
292 } 294 }
293 295
294 // Insert output. 296 // Insert output.
295 modules.emplace(svc_mem_info.base_address, path_pointer); 297 modules.emplace(svc_mem_info.base_address,
298 std::string_view(path_pointer, path_end));
296 } 299 }
297 } 300 }
298 } 301 }