]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/buffer.h
Force wide char environment version initialization in wxGetEnvMap().
[wxWidgets.git] / include / wx / buffer.h
index 800c41b71431183f652977a56ab2411c3e7facbe..ec0e1fc7651e541c116a88a402f6c2e2621de06a 100644 (file)
@@ -312,6 +312,10 @@ public:
         if ( !str )
             return false;
 
         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);
         if ( this->m_data == this->GetNullData() )
         {
             this->m_data = new Data(str, len);