From d8670fbd872184107aa281bbe744ea7f9417eddb Mon Sep 17 00:00:00 2001 From: CTCaer Date: Fri, 15 Oct 2021 16:50:56 +0300 Subject: [PATCH] nyx: bis: correct lookup check --- nyx/nyx_gui/storage/nx_emmc_bis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nyx/nyx_gui/storage/nx_emmc_bis.c b/nyx/nyx_gui/storage/nx_emmc_bis.c index fae5d00..9951a7c 100644 --- a/nyx/nyx_gui/storage/nx_emmc_bis.c +++ b/nyx/nyx_gui/storage/nx_emmc_bis.c @@ -137,7 +137,7 @@ static int nx_emmc_bis_write_block(u32 sector, u32 count, void *buff, bool flush u32 aligned_sector = cluster * BIS_CLUSTER_SECTORS; u32 sector_in_cluster = sector % BIS_CLUSTER_SECTORS; u32 lookup_idx = cache_lookup_tbl[cluster]; - bool is_cached = lookup_idx != BIS_CACHE_LOOKUP_TBL_EMPTY_ENTRY; + bool is_cached = lookup_idx != (u32)BIS_CACHE_LOOKUP_TBL_EMPTY_ENTRY; // Write to cached cluster. if (is_cached) @@ -264,7 +264,7 @@ static int nx_emmc_bis_read_block_cached(u32 sector, u32 count, void *buff) u32 lookup_idx = cache_lookup_tbl[cluster]; // Read from cached cluster. - if (lookup_idx != BIS_CACHE_LOOKUP_TBL_EMPTY_ENTRY) + if (lookup_idx != (u32)BIS_CACHE_LOOKUP_TBL_EMPTY_ENTRY) { memcpy(buff, bis_cache->clusters[lookup_idx].data + sector_in_cluster * NX_EMMC_BLOCKSIZE, count * NX_EMMC_BLOCKSIZE);