diff options
author | Jiyoung Yun <jy910.yun@samsung.com> | 2016-12-27 16:46:08 +0900 |
---|---|---|
committer | Jiyoung Yun <jy910.yun@samsung.com> | 2016-12-27 16:46:08 +0900 |
commit | db20f3f1bb8595633a7e16c8900fd401a453a6b5 (patch) | |
tree | e5435159cd1bf0519276363a6fe1663d1721bed3 /src/coreclr/hosts/coreconsole/coreconsole.cpp | |
parent | 4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (diff) | |
download | coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.gz coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.bz2 coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.zip |
Imported Upstream version 1.0.0.9127upstream/1.0.0.9127
Diffstat (limited to 'src/coreclr/hosts/coreconsole/coreconsole.cpp')
-rw-r--r-- | src/coreclr/hosts/coreconsole/coreconsole.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/coreclr/hosts/coreconsole/coreconsole.cpp b/src/coreclr/hosts/coreconsole/coreconsole.cpp index 1533dff88e..ea4e2e72c5 100644 --- a/src/coreclr/hosts/coreconsole/coreconsole.cpp +++ b/src/coreclr/hosts/coreconsole/coreconsole.cpp @@ -44,7 +44,7 @@ public: m_capacity = m_defaultSize; } if (m_length + strLen + 1 > m_capacity) { - size_t newCapacity = m_capacity * 2; + size_t newCapacity = (m_length + strLen + 1) * 2; wchar_t* newBuffer = new wchar_t[newCapacity]; wcsncpy_s(newBuffer, newCapacity, m_buffer, m_length); delete[] m_buffer; @@ -185,7 +185,7 @@ public: } } - bool TPAListContainsFile(_In_z_ wchar_t* fileNameWithoutExtension, _In_reads_(countExtensions) wchar_t** rgTPAExtensions, int countExtensions) + bool TPAListContainsFile(_In_z_ wchar_t* fileNameWithoutExtension, _In_reads_(countExtensions) const wchar_t** rgTPAExtensions, int countExtensions) { if (!m_tpaList.CStr()) return false; @@ -225,7 +225,7 @@ public: } } - void AddFilesFromDirectoryToTPAList(_In_z_ wchar_t* targetPath, _In_reads_(countExtensions) wchar_t** rgTPAExtensions, int countExtensions) + void AddFilesFromDirectoryToTPAList(_In_z_ wchar_t* targetPath, _In_reads_(countExtensions) const wchar_t** rgTPAExtensions, int countExtensions) { *m_log << W("Adding assemblies from ") << targetPath << W(" to the TPA list") << Logger::endl; wchar_t assemblyPath[MAX_LONGPATH]; @@ -288,7 +288,7 @@ public: // On first call, scans the coreclr directory for dlls and adds them all to the list. const wchar_t * GetTpaList() { if (!m_tpaList.CStr()) { - wchar_t *rgTPAExtensions[] = { + const wchar_t *rgTPAExtensions[] = { W("*.ni.dll"), // Probe for .ni.dll first so that it's preferred if ni and il coexist in the same dir W("*.dll"), W("*.ni.exe"), @@ -457,7 +457,6 @@ bool TryRun(const int argc, const wchar_t* argv[], Logger &log, const bool verbo W("APP_PATHS"), W("APP_NI_PATHS"), W("NATIVE_DLL_SEARCH_DIRECTORIES"), - W("AppDomainCompatSwitch") }; const wchar_t *property_values[] = { // TRUSTED_PLATFORM_ASSEMBLIES @@ -468,8 +467,6 @@ bool TryRun(const int argc, const wchar_t* argv[], Logger &log, const bool verbo appNiPath, // NATIVE_DLL_SEARCH_DIRECTORIES nativeDllSearchDirs, - // AppDomainCompatSwitch - W("UseLatestBehaviorWhenTFMNotSpecified") }; |