From 7dc3de34f82454b255df143facd0c3ce67f1ad7a Mon Sep 17 00:00:00 2001 From: FreeBear Date: Wed, 22 May 2024 11:56:23 +0100 Subject: [PATCH] One too many file system dividers used for megabyte comparison. --- src/hasp/hasp_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hasp/hasp_parser.cpp b/src/hasp/hasp_parser.cpp index 2f79ffb6..64e4729f 100644 --- a/src/hasp/hasp_parser.cpp +++ b/src/hasp/hasp_parser.cpp @@ -211,7 +211,7 @@ int Parser::format_bytes(uint64_t filesize, char* buf, size_t len) filesize /= D_FILE_SIZE_DIVIDER; tmp = (uint32_t) filesize; - if(filesize < D_FILE_SIZE_DIVIDER * D_FILE_SIZE_DIVIDER * 100) + if(filesize < D_FILE_SIZE_DIVIDER * 100) return snprintf_P(buf, len, PSTR("%u" D_DECIMAL_POINT "%02u " D_FILE_SIZE_MEGABYTES), tmp / 100, tmp % 100);