diff options
| author | 2023-12-09 11:16:42 -0500 | |
|---|---|---|
| committer | 2023-12-09 11:18:10 -0500 | |
| commit | fe5e4bd846c9a10a11b8b3747b8618552c588006 (patch) | |
| tree | b212ccf083b0e231a0eee271bef8dc1a8413eb50 /src/core/arm/debug.cpp | |
| parent | Merge pull request #12274 from liamwhite/srgb-nonsense (diff) | |
| download | yuzu-fe5e4bd846c9a10a11b8b3747b8618552c588006.tar.gz yuzu-fe5e4bd846c9a10a11b8b3747b8618552c588006.tar.xz yuzu-fe5e4bd846c9a10a11b8b3747b8618552c588006.zip | |
debug: fix reading of module names
Diffstat (limited to 'src/core/arm/debug.cpp')
| -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) { | |||
| 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 | } |