X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/846b6c86586ff3c5a1948132761ba223f3ccb75c..dbec0fc8d8cf228342acf70a83d75171b36690dd:/include/wx/buffer.h diff --git a/include/wx/buffer.h b/include/wx/buffer.h index 800c41b714..ec0e1fc765 100644 --- a/include/wx/buffer.h +++ b/include/wx/buffer.h @@ -312,6 +312,10 @@ public: if ( !str ) return false; + // For consistency with the ctor taking just the length, NUL-terminate + // the buffer. + str[len] = (CharType)0; + if ( this->m_data == this->GetNullData() ) { this->m_data = new Data(str, len);