From 19ddff299a71b210c25d0ca9c705bde7dd89187a Mon Sep 17 00:00:00 2001 From: CTCaer Date: Wed, 2 Dec 2020 01:47:37 +0200 Subject: [PATCH] hos: Fix exfat FS check again.. --- bootloader/hos/hos.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bootloader/hos/hos.c b/bootloader/hos/hos.c index ccfcefa..6589438 100644 --- a/bootloader/hos/hos.c +++ b/bootloader/hos/hos.c @@ -679,7 +679,6 @@ static void _free_launch_components(launch_ctxt_t *ctxt) static bool _get_fs_exfat_compatible(link_t *info, bool *fs_is_510) { - u32 fs_idx; u32 fs_ids_cnt; u32 sha_buf[32 / sizeof(u32)]; kip1_id_t *kip_ids; @@ -694,7 +693,7 @@ static bool _get_fs_exfat_compatible(link_t *info, bool *fs_is_510) pkg2_get_ids(&kip_ids, &fs_ids_cnt); - for (fs_idx = 0; fs_idx < fs_ids_cnt; fs_idx++) + for (u32 fs_idx = 0; fs_idx < fs_ids_cnt; fs_idx++) { if (!memcmp(sha_buf, kip_ids[fs_idx].hash, 8)) { @@ -703,7 +702,7 @@ static bool _get_fs_exfat_compatible(link_t *info, bool *fs_is_510) *fs_is_510 = true; // Check if FAT32-only. - if (fs_ids_cnt <= fs_idx && !(fs_idx & 1)) + if (!(fs_idx & 1)) return false; // FS is FAT32 + exFAT.