Check for NUL terminator in MemoryPool::findString()

This commit is contained in:
Benoit Blanchon
2021-11-20 20:30:24 +01:00
parent 43b2e2e774
commit a27398e445
9 changed files with 64 additions and 3 deletions

View File

@@ -33,6 +33,11 @@ class StringAdapter<std::basic_string<char, TCharTraits, TAllocator> > {
return _str->compare(other);
}
char operator[](size_t i) const {
ARDUINOJSON_ASSERT(i <= size());
return _str->operator[](i);
}
size_t size() const {
return _str->size();
}