From 825ffd7b1f25792c68a92a6966a05a461e30041a Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 10 Jun 2019 22:58:05 -0400 Subject: [PATCH] file_sys/card_image: Get rid of a magic number We can just use the size of the array to dehardcode it. --- src/core/file_sys/card_image.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/file_sys/card_image.cpp b/src/core/file_sys/card_image.cpp index 1fec9b0e9..fd00e5457 100644 --- a/src/core/file_sys/card_image.cpp +++ b/src/core/file_sys/card_image.cpp @@ -27,7 +27,7 @@ constexpr std::array partition_names{ XCI::XCI(VirtualFile file_) : file(std::move(file_)), program_nca_status{Loader::ResultStatus::ErrorXCIMissingProgramNCA}, - partitions(0x4) { + partitions(partition_names.size()) { if (file->ReadObject(&header) != sizeof(GamecardHeader)) { status = Loader::ResultStatus::ErrorBadXCIHeader; return;