Alistair Leslie-Hughes : mscoree: Allow capital for version number.
Alexandre Julliard
julliard at winehq.org
Tue Mar 27 12:48:07 CDT 2012
Module: wine
Branch: master
Commit: d08e89a8d61bf3224503327b7f40ef65cab7b038
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d08e89a8d61bf3224503327b7f40ef65cab7b038
Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Thu Mar 15 22:40:25 2012 +1100
mscoree: Allow capital for version number.
---
dlls/mscoree/metahost.c | 2 +-
dlls/mscoree/mscoree_main.c | 3 +++
dlls/mscoree/tests/mscoree.c | 6 ++++++
3 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/dlls/mscoree/metahost.c b/dlls/mscoree/metahost.c
index f915d73..f877b1e 100644
--- a/dlls/mscoree/metahost.c
+++ b/dlls/mscoree/metahost.c
@@ -988,7 +988,7 @@ static BOOL parse_runtime_version(LPCWSTR version, DWORD *major, DWORD *minor, D
*minor = 0;
*build = 0;
- if (version[0] == 'v')
+ if (version[0] == 'v' || version[0] == 'V')
{
version++;
if (!isdigit(*version))
diff --git a/dlls/mscoree/mscoree_main.c b/dlls/mscoree/mscoree_main.c
index 0ebc813..1e06909 100644
--- a/dlls/mscoree/mscoree_main.c
+++ b/dlls/mscoree/mscoree_main.c
@@ -347,6 +347,9 @@ HRESULT WINAPI GetRequestedRuntimeInfo(LPCWSTR pExe, LPCWSTR pwszVersion, LPCWST
if (SUCCEEDED(ret))
{
+ if(pwszVersion)
+ pVersion[0] = pwszVersion[0];
+
*dwDirectoryLength = dwDirectory;
ret = ICLRRuntimeInfo_GetRuntimeDirectory(info, pDirectory, dwDirectoryLength);
}
diff --git a/dlls/mscoree/tests/mscoree.c b/dlls/mscoree/tests/mscoree.c
index 9b115c0..f8de6fa 100644
--- a/dlls/mscoree/tests/mscoree.c
+++ b/dlls/mscoree/tests/mscoree.c
@@ -61,6 +61,7 @@ static BOOL init_functionpointers(void)
static void test_versioninfo(void)
{
const WCHAR v9_0[] = {'v','9','.','0','.','3','0','3','1','9',0};
+ const WCHAR v2_0cap[] = {'V','2','.','0','.','5','0','7','2','7',0};
const WCHAR v2_0[] = {'v','2','.','0','.','5','0','7','2','7',0};
const WCHAR v2_0_0[] = {'v','2','.','0','.','0',0};
const WCHAR v1_1[] = {'v','1','.','1','.','4','3','2','2',0};
@@ -147,6 +148,11 @@ static void test_versioninfo(void)
ok(hr == S_OK, "GetRequestedRuntimeInfo returned %08x\n", hr);
ok(!winetest_strcmpW(version, v2_0), "version is %s , expected %s\n", wine_dbgstr_w(version), wine_dbgstr_w(v2_0));
+ memset(version, 0, sizeof(version));
+ hr = pGetRequestedRuntimeInfo( NULL, v2_0cap, NULL, 0, 0, path, MAX_PATH, &path_len, version, MAX_PATH, NULL);
+ ok(hr == S_OK, "GetRequestedRuntimeInfo returned %08x\n", hr);
+ ok(!winetest_strcmpW(version, v2_0cap), "version is %s , expected %s\n", wine_dbgstr_w(version), wine_dbgstr_w(v2_0cap));
+
/* Invalid Version and RUNTIME_INFO_UPGRADE_VERSION flag*/
memset(version, 0, sizeof(version));
hr = pGetRequestedRuntimeInfo( NULL, v1_1, NULL, 0, RUNTIME_INFO_UPGRADE_VERSION, path, MAX_PATH, &path_len, version, MAX_PATH, NULL);
More information about the wine-cvs
mailing list