Commit ebad758a authored by PhiBo's avatar PhiBo 🚀

Fix overflow

parent d25fd21c
......@@ -42,7 +42,9 @@ class DataString : public Print
void reset() { this->length = 0; };
virtual size_t write(uint8_t c) {
this->data[this->length] = c;
this->length++;
if(this->length < SIZE) {
this->length++;
}
};
uint16_t length;
uint8_t data[SIZE];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment