From d2684f66a190444940835febe357ce972c0092ae Mon Sep 17 00:00:00 2001 From: CTCaer Date: Tue, 19 Oct 2021 09:11:36 +0300 Subject: [PATCH] hos: change exfat check order --- bootloader/hos/hos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootloader/hos/hos.c b/bootloader/hos/hos.c index 62f92c0..64de50d 100644 --- a/bootloader/hos/hos.c +++ b/bootloader/hos/hos.c @@ -748,7 +748,7 @@ static bool _get_fs_exfat_compatible(link_t *info, u32 *hos_revision) pkg2_get_ids(&kip_ids, &fs_ids_cnt); - for (u32 fs_idx = 0; fs_idx < fs_ids_cnt; fs_idx++) + for (int fs_idx = fs_ids_cnt - 1; fs_idx >= 0; fs_idx--) { if (!memcmp(sha_buf, kip_ids[fs_idx].hash, 8)) { @@ -770,7 +770,7 @@ static bool _get_fs_exfat_compatible(link_t *info, u32 *hos_revision) break; } - // Hash didn't match or FAT32 + exFAT. + // FAT32 + exFAT or unknown FS version. return true; }