mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-23 07:17:30 +02:00
Make JSON_STRING_SIZE(N)
return N+1
to fix third-party code
ThingsBoard uses this macro to compute size of char arrays ಠ_ಠ https://github.com/thingsboard/thingsboard-client-sdk/blob/v0.12.2/src/Helper.h#L38 Closes #2054
This commit is contained in:
@ -14,5 +14,5 @@ TEST_CASE("JSON_OBJECT_SIZE") {
|
||||
}
|
||||
|
||||
TEST_CASE("JSON_STRING_SIZE") {
|
||||
REQUIRE(JSON_STRING_SIZE(10) == ArduinoJson::detail::sizeofString(10));
|
||||
REQUIRE(JSON_STRING_SIZE(10) == 11); // issue #2054
|
||||
}
|
||||
|
Reference in New Issue
Block a user