diff --git a/scintilla/src/Document.cxx b/scintilla/src/Document.cxx index aafe8fcd6d..485791c485 100644 --- a/scintilla/src/Document.cxx +++ b/scintilla/src/Document.cxx @@ -2979,7 +2979,7 @@ class BuiltinRegex final : public RegexSearchBase { RESearch search; #if defined(BOOST_REGEX_STANDALONE) || !defined(NO_CXX11_REGEX) // cache for previous pattern to avoid recompile - FindOption previousFlags; + FindOption previousFlags = FindOption::None; std::string cachedPattern; #endif std::string substituted; diff --git a/src/Notepad2.c b/src/Notepad2.c index 2cf3d730ee..26a7daca4a 100644 --- a/src/Notepad2.c +++ b/src/Notepad2.c @@ -1038,7 +1038,7 @@ void MsgDropFiles(HWND hwnd, UINT umsg, WPARAM wParam) { HDROP hDrop = (HDROP)wParam; // fix drag & drop file from 32-bit app to 64-bit Notepad2 before Win 10 #if defined(_WIN64) && (_WIN32_WINNT < _WIN32_WINNT_WIN10) - if (umsg == WM_DROPFILES) { + if (umsg == WM_DROPFILES && !bReadOnlyMode) { POINT pt; if (DragQueryPoint(hDrop, &pt)) { // client area RECT rc;