diff --git a/mxml.cxx b/mxml.cxx index 4c0efb8..49f37f4 100644 --- a/mxml.cxx +++ b/mxml.cxx @@ -238,7 +238,7 @@ MXML_WRITER *mxml_open_buffer(void) if (mxml_suppress_date_flag == 0) { time_t now = time(NULL); std::string str = ctime(&now); - str[24] = 0; + str.resize(24); std::string line = ""; //sprintf(line, "\n", str); line += "\n", str); line += "