Test that size can't go above capacity

This commit is contained in:
Benoit Blanchon committed 2014-09-27 11:33:45 +02:00
1 parent bb887f94e7
commit 890e811e80
2 files changed
+17 -1

No files matched your search

+6 -1
View File
@@ -14,7 +14,12 @@ public:
virtual ~StaticJsonBuffer() {}
/*JsonObject*/void createObject() { _size++; }
/*JsonObject*/
void createObject()
{
if (_size < CAPACITY)
_size++;
}
int capacity()
{