From 2f17034254234999678c5e9eb7c126d78f73b292 Mon Sep 17 00:00:00 2001 From: tharexde Date: Sat, 15 May 2021 16:00:33 +0200 Subject: [PATCH] fixed evaluation of eml file size --- armsrc/Standalone/lf_tharexde.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/armsrc/Standalone/lf_tharexde.c b/armsrc/Standalone/lf_tharexde.c index f06cd9b07..74a0ef840 100644 --- a/armsrc/Standalone/lf_tharexde.c +++ b/armsrc/Standalone/lf_tharexde.c @@ -102,7 +102,7 @@ static bool get_input_data_from_file(uint32_t *tag, char *inputfile) { rdv40_spiffs_read_as_filetype(inputfile, mem, size, RDV40_SPIFFS_SAFETY_SAFE); - now = size / 9; + now = (size + 1) / 9; for (int i = 0; i < now; i++) { for (int j = 0; j < 4; j++) { tag[i] |= (hex2int(mem[2 * j + 9 * i]) << 4 | hex2int(mem[2 * j + 1 + 9 * i])) << ((3 - j) * 8);