X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c193821a999730fbf6a9bea83763f37daae68f1..e7c9692f16127b39de2723457cdb2d46e563b383:/src/common/regex.cpp?ds=inline diff --git a/src/common/regex.cpp b/src/common/regex.cpp index 62ffa7c781..e39cde96bf 100644 --- a/src/common/regex.cpp +++ b/src/common/regex.cpp @@ -148,9 +148,7 @@ wxString wxRegExImpl::GetErrorMsg(int errorcode) const msg = wxString(buf.data(), wxConvLibc); #else // !Unicode - (void)regerror(errorcode, &m_RegEx, msg.GetWriteBuf(len), len); - - msg.UngetWriteBuf(); + (void)regerror(errorcode, &m_RegEx, wxStringBuffer(msg, len), len); #endif // Unicode/!Unicode } else // regerror() returned 0