X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9aee09a34bdeea9a65ecd7258d9e87f44b3d5e25..a949e8fac2666418b2a6eb15e94959563cf8aad6:/src/common/regex.cpp diff --git a/src/common/regex.cpp b/src/common/regex.cpp index 1d5a9f6323..cbaa57991d 100644 --- a/src/common/regex.cpp +++ b/src/common/regex.cpp @@ -38,8 +38,8 @@ #include "wx/intl.h" #endif //WX_PRECOMP -// FreeBSD requires this, it probably doesn't hurt for others -#ifdef __UNIX__ +// FreeBSD & Watcom require this, it probably doesn't hurt for others +#if defined(__UNIX__) || defined(__WATCOMC__) #include #endif @@ -132,7 +132,7 @@ wxString wxRegExImpl::GetErrorMsg(int errorcode) const (void)regerror(errorcode, &m_RegEx, (char *)buf.data(), len); - msg = buf.data(); + msg = wxString(buf.data(), wxConvLibc); #else // !Unicode (void)regerror(errorcode, &m_RegEx, msg.GetWriteBuf(len), len);