From 378e3cd254aafc9534b4eb78a1dc16f3daa2043d Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 12 Feb 2024 12:04:07 +0100 Subject: [PATCH] fix #2288 bad comparision --- client/src/fileutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/fileutils.c b/client/src/fileutils.c index 6f84b1f12..e337f941c 100644 --- a/client/src/fileutils.c +++ b/client/src/fileutils.c @@ -1219,7 +1219,7 @@ int loadFileNFC_safe(const char *preferredName, void *data, size_t maxdatalen, s continue; } - if (((pageno * MFU_BLOCK_SIZE) + MFU_BLOCK_SIZE) >= maxdatalen) { + if (((pageno * MFU_BLOCK_SIZE) + MFU_BLOCK_SIZE) > maxdatalen) { continue; } @@ -1245,7 +1245,7 @@ int loadFileNFC_safe(const char *preferredName, void *data, size_t maxdatalen, s continue; } - if (((blockno * MFBLOCK_SIZE) + MFBLOCK_SIZE) >= maxdatalen) { + if (((blockno * MFBLOCK_SIZE) + MFBLOCK_SIZE) > maxdatalen) { continue; }