From 753958de282c8f9f54b97a0802dec5f7a73aa128 Mon Sep 17 00:00:00 2001 From: Mat M Date: Thu, 4 Apr 2019 23:04:26 -0400 Subject: [PATCH] fs_mitm/fs_dir_utils: Amend logic error within IterateDirectoryRecursivelyInternal() (#498) This likely intended to get the size of the string and then subtract the null terminator byte. Instead, this would always result in a sizeof of 8. --- stratosphere/ams_mitm/source/fs_mitm/fs_dir_utils.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratosphere/ams_mitm/source/fs_mitm/fs_dir_utils.hpp b/stratosphere/ams_mitm/source/fs_mitm/fs_dir_utils.hpp index 3656c7348..cedc3f1b0 100644 --- a/stratosphere/ams_mitm/source/fs_mitm/fs_dir_utils.hpp +++ b/stratosphere/ams_mitm/source/fs_mitm/fs_dir_utils.hpp @@ -32,7 +32,7 @@ class FsDirUtils { return rc; } - const size_t parent_len = strnlen(work_path.str, sizeof(work_path.str - 1)); + const size_t parent_len = strnlen(work_path.str, sizeof(work_path.str) - 1); /* Read and handle entries. */ while (true) {