Set ARDUINOJSON_POOL_CAPACITY from ARDUINOJSON_SLOT_ID_SIZE

This avoids the integer overflow when `ARDUINOJSON_SLOT_ID_SIZE=1` on 64-bit architectures.
This commit is contained in:
Benoit Blanchon committed 2024-09-11 21:08:51 +02:00
1 parent a1809d0f31
commit c1a507c158
5 files changed
+10 -2

No files matched your search

+2 -2
View File
@@ -110,9 +110,9 @@
// Capacity of each variant pool (in slots)
#ifndef ARDUINOJSON_POOL_CAPACITY
# if ARDUINOJSON_SIZEOF_POINTER <= 2
# if ARDUINOJSON_SLOT_ID_SIZE == 1
# define ARDUINOJSON_POOL_CAPACITY 16 // 96 bytes
# elif ARDUINOJSON_SIZEOF_POINTER == 4
# elif ARDUINOJSON_SLOT_ID_SIZE == 2
# define ARDUINOJSON_POOL_CAPACITY 128 // 1024 bytes
# else
# define ARDUINOJSON_POOL_CAPACITY 256 // 4096 bytes