mscoree: Allow capital for version number

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Fri Mar 23 03:45:22 CDT 2012


Hi,


Changelog:
     mscoree: Allow capital for version number


Best Regards
  Alistair Leslie-Hughes
-------------- next part --------------
>From c53c8256a7a897d96fafcbf73cc80910f44aa10e Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Thu, 15 Mar 2012 22:40:25 +1100
Subject: [PATCH] Allow capital for version number
To: wine-patches <wine-patches at winehq.org>

---
 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 e15a638..1e377d4 100644
--- a/dlls/mscoree/metahost.c
+++ b/dlls/mscoree/metahost.c
@@ -973,7 +973,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 1aa120f..5efad1e 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);
-- 
1.7.5.4



More information about the wine-patches mailing list