diff --git a/minipath/src/Config.cpp b/minipath/src/Config.cpp index ed279053b..193b36587 100644 --- a/minipath/src/Config.cpp +++ b/minipath/src/Config.cpp @@ -336,6 +336,7 @@ extern "C" BOOL IniFileIterateSection(LPCWSTR lpFilePath, LPCWSTR lpSectionName, // get all keys in a section CSimpleIniW::TNamesDepend keyList; Ini.GetAllKeys(lpSectionName, keyList); + keyList.sort(CSimpleIniW::Entry::LoadOrder()); for (const auto& key : keyList) { diff --git a/src/SciCall.h b/src/SciCall.h index a19bd58a6..94ce8e361 100644 --- a/src/SciCall.h +++ b/src/SciCall.h @@ -575,13 +575,13 @@ inline DocPos Sci_GetRangeMaxLineLength(DocLn iBeginLine, DocLn iEndLine) { inline int Sci_GetCurrentEOL_A(LPCH eol) { switch (SciCall_GetEOLMode()) { case SC_EOL_CRLF: - eol[0] = '\r'; eol[1] = '\n'; eol[2] = '\0'; + if (eol) { eol[0] = '\r'; eol[1] = '\n'; eol[2] = '\0'; } return 2; case SC_EOL_CR: - eol[0] = '\r'; eol[1] = '\0'; + if (eol) { eol[0] = '\r'; eol[1] = '\0'; } return 1; case SC_EOL_LF: - eol[0] = '\n'; eol[1] = '\0'; + if (eol) { eol[0] = '\n'; eol[1] = '\0'; } return 1; default: return 0; @@ -592,13 +592,13 @@ inline int Sci_GetCurrentEOL_A(LPCH eol) { inline int Sci_GetCurrentEOL_W(LPWCH eol) { switch (SciCall_GetEOLMode()) { case SC_EOL_CRLF: - eol[0] = L'\r'; eol[1] = L'\n'; eol[2] = L'\0'; + if (eol) { eol[0] = L'\r'; eol[1] = L'\n'; eol[2] = L'\0'; } return 2; case SC_EOL_CR: - eol[0] = L'\r'; eol[1] = L'\0'; + if (eol) { eol[0] = L'\r'; eol[1] = L'\0'; } return 1; case SC_EOL_LF: - eol[0] = L'\n'; eol[1] = L'\0'; + if (eol) { eol[0] = L'\n'; eol[1] = L'\0'; } return 1; default: return 0;