[EMAIL PROTECTED] wrote: > --- lyx-devel/trunk/src/support/docstring.C (original) +++ > lyx-devel/trunk/src/support/docstring.C Tue Nov 28 01:24:18 2006 @@ -468,6 > +468,7 @@ > s.reserve(64); > for (; iit != eit && isNumpunct(*iit); ++iit) > s += static_cast<char>(*iit); > + s += '\0'; > string_num_get_facet f; > f.get(s.begin(), s.end(), b, err, v);
std::string is not required to be zero-terminated (only std::string::c_str() is required to return a zero-terminated array of chars). That means that this change is wrong and may lead to "interesting" results (compare the recent thread about macro arguments). The old version should be fine, the += operator should set the string length correctly. Georg
