mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-15 03:26:39 +02:00
Check for NUL terminator in MemoryPool::findString()
This commit is contained in:
@ -37,6 +37,12 @@ class String {
|
||||
return *this;
|
||||
}
|
||||
|
||||
char operator[](unsigned int index) const {
|
||||
if (index >= _str.size())
|
||||
return 0;
|
||||
return _str[index];
|
||||
}
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& lhs, const ::String& rhs) {
|
||||
lhs << rhs._str;
|
||||
return lhs;
|
||||
|
Reference in New Issue
Block a user