diff options
author | Neil Hodgson <nyamatongwe@gmail.com> | 2018-05-16 11:43:01 +1000 |
---|---|---|
committer | Neil Hodgson <nyamatongwe@gmail.com> | 2018-05-16 11:43:01 +1000 |
commit | 811e4dd5158e45e2830d2d431a48a9a2297de226 (patch) | |
tree | 6370f6a223de64b65d0636209c78bd866c9c6cfb | |
parent | 4d667aefdae2f120ae77548f07c0a18fd83f0a8a (diff) | |
download | scintilla-mirror-811e4dd5158e45e2830d2d431a48a9a2297de226.tar.gz |
Fix regex crash reported with libstdc++ on macOS that occurs
when the regex has a locale imbued.
-rw-r--r-- | doc/ScintillaHistory.html | 3 | ||||
-rw-r--r-- | src/Document.cxx | 7 |
2 files changed, 3 insertions, 7 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 1429ce7ab..5d94a0ec5 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -549,6 +549,9 @@ Crashes fixed on macOS for invalid DBCS characters when dragging text, changing case of text, case-insensitive searching, and retrieving text as UTF-8. </li> + <li> + Regular expression crash fixed on macOS when linking to libstdc++. + </li> </ul> <h3> <a href="https://www.scintilla.org/scite405.zip">Release 4.0.5</a> diff --git a/src/Document.cxx b/src/Document.cxx index bcc368a68..222a8bc31 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -2949,13 +2949,6 @@ Sci::Position Cxx11RegexFindText(const Document *doc, Sci::Position minPos, Sci: #endif ws[outLen] = 0; std::wregex regexp; -#if defined(__APPLE__) - // Using a UTF-8 locale doesn't change to Unicode over a byte buffer so '.' - // is one byte not one character. - // However, on OS X this makes wregex act as Unicode - std::locale localeU("en_US.UTF-8"); - regexp.imbue(localeU); -#endif regexp.assign(&ws[0], flagsRe); matched = MatchOnLines<UTF8Iterator>(doc, regexp, resr, search); |