1
0
Fork 0
forked from suyu/suyu

file_sys/card_image: Get rid of a magic number

We can just use the size of the array to dehardcode it.
This commit is contained in:
Lioncash 2019-06-10 22:58:05 -04:00
parent bf35138d1d
commit 825ffd7b1f
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -27,7 +27,7 @@ constexpr std::array partition_names{
XCI::XCI(VirtualFile file_) XCI::XCI(VirtualFile file_)
: file(std::move(file_)), program_nca_status{Loader::ResultStatus::ErrorXCIMissingProgramNCA}, : file(std::move(file_)), program_nca_status{Loader::ResultStatus::ErrorXCIMissingProgramNCA},
partitions(0x4) { partitions(partition_names.size()) {
if (file->ReadObject(&header) != sizeof(GamecardHeader)) { if (file->ReadObject(&header) != sizeof(GamecardHeader)) {
status = Loader::ResultStatus::ErrorBadXCIHeader; status = Loader::ResultStatus::ErrorBadXCIHeader;
return; return;