diff --git a/cores/esp8266/cbuf.cpp b/cores/esp8266/cbuf.cpp index cf539e6b0..b50c47742 100644 --- a/cores/esp8266/cbuf.cpp +++ b/cores/esp8266/cbuf.cpp @@ -22,7 +22,7 @@ #include "c_types.h" cbuf::cbuf(size_t size) : - _size(size), _buf(new char[size]), _bufend(_buf + size), _begin(_buf), _end(_begin) { + next(NULL), _size(size), _buf(new char[size]), _bufend(_buf + size), _begin(_buf), _end(_begin) { } cbuf::~cbuf() { diff --git a/cores/esp8266/cbuf.h b/cores/esp8266/cbuf.h index bc6372819..08e1b2266 100644 --- a/cores/esp8266/cbuf.h +++ b/cores/esp8266/cbuf.h @@ -56,6 +56,8 @@ class cbuf { void flush(); size_t remove(size_t size); + cbuf *next; + private: inline char* wrap_if_bufend(char* ptr) const { return (ptr == _bufend) ? _buf : ptr; @@ -66,6 +68,7 @@ class cbuf { const char* _bufend; char* _begin; char* _end; + }; #endif//__cbuf_h