mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-02 00:38:26 +01:00
Test that size can't go above capacity
This commit is contained in:
@@ -14,7 +14,12 @@ public:
|
||||
|
||||
virtual ~StaticJsonBuffer() {}
|
||||
|
||||
/*JsonObject*/void createObject() { _size++; }
|
||||
/*JsonObject*/
|
||||
void createObject()
|
||||
{
|
||||
if (_size < CAPACITY)
|
||||
_size++;
|
||||
}
|
||||
|
||||
int capacity()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user