X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c193821a999730fbf6a9bea83763f37daae68f1..7c4728f63395c3641aa62f2b549ee693eb8be978:/src/common/regex.cpp?ds=sidebyside 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