X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c193821a999730fbf6a9bea83763f37daae68f1..350fffae72c078442d6d177d2071e62f2687df9f:/src/common/regex.cpp 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