https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9eddd0f1938e084c2c3f6…
commit 9eddd0f1938e084c2c3f6bb2d76163fc26c6ca75
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Tue Dec 8 18:00:49 2020 +0100
Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com>
CommitDate: Tue Jan 5 11:03:13 2021 +0100
[WINESYNC] wininet: Add missing schemes to url_schemes.
Fixes res URL scheme handling.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=31399
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 64cb9425da43271109bc1df8df4aa32132f257ae by Jacek Caban
<jacek(a)codeweavers.com>
---
dll/win32/wininet/internet.c | 23 +++++++++++++----------
modules/rostests/winetests/wininet/url.c | 5 ++++-
sdk/tools/winesync/wininet.cfg | 2 +-
3 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/dll/win32/wininet/internet.c b/dll/win32/wininet/internet.c
index 24f91a334e6..10e47625726 100644
--- a/dll/win32/wininet/internet.c
+++ b/dll/win32/wininet/internet.c
@@ -1579,16 +1579,19 @@ BOOL WINAPI InternetCrackUrlA(const char *url, DWORD url_length,
DWORD flags, UR
return ret;
}
-static const WCHAR url_schemes[][7] =
+static const WCHAR *url_schemes[] =
{
- {'f','t','p',0},
- {'g','o','p','h','e','r',0},
- {'h','t','t','p',0},
- {'h','t','t','p','s',0},
- {'f','i','l','e',0},
- {'n','e','w','s',0},
- {'m','a','i','l','t','o',0},
- {'r','e','s',0},
+ L"ftp",
+ L"gopher",
+ L"http",
+ L"https",
+ L"file",
+ L"news",
+ L"mailto",
+ L"socks",
+ L"javascript",
+ L"vbscript",
+ L"res"
};
/***********************************************************************
@@ -4216,7 +4219,7 @@ static LPCWSTR INTERNET_GetSchemeString(INTERNET_SCHEME scheme)
index = scheme - INTERNET_SCHEME_FIRST;
if (index >= ARRAY_SIZE(url_schemes))
return NULL;
- return (LPCWSTR)url_schemes[index];
+ return url_schemes[index];
}
/* we can calculate using ansi strings because we're just
diff --git a/modules/rostests/winetests/wininet/url.c
b/modules/rostests/winetests/wininet/url.c
index 19ae7c3314e..ba9d9654424 100644
--- a/modules/rostests/winetests/wininet/url.c
+++ b/modules/rostests/winetests/wininet/url.c
@@ -168,7 +168,10 @@ static const crack_url_test_t crack_url_tests[] = {
"file", "", "", "", "C:\\Program
Files\\Atmel\\.\\Asdf.xml", ""},
{"C:\\file.txt",
0, 1, INTERNET_SCHEME_UNKNOWN, -1, 0, -1, 0, -1, 0, -1, 0, 2, 9, -1, 0,
- "C", "", "", "", "\\file.txt",
""}
+ "C", "", "", "", "\\file.txt",
""},
+ {"res://IELib.dll/test.htm",
+ 0, 3, INTERNET_SCHEME_RES, 6, 9, -1, 0, -1, 0, -1, 0, 15, 9, -1, 0,
+ "res", "IELib.dll", "", "",
"/test.htm", ""},
};
static WCHAR *a2w(const char *str)
diff --git a/sdk/tools/winesync/wininet.cfg b/sdk/tools/winesync/wininet.cfg
index daa9b544dc2..125dba9e287 100644
--- a/sdk/tools/winesync/wininet.cfg
+++ b/sdk/tools/winesync/wininet.cfg
@@ -5,4 +5,4 @@ files:
include/wininet.h: sdk/include/psdk/wininet.h
include/winineti.h: sdk/include/psdk/winineti.h
tags:
- wine: 84069679a407cf0b5b8d185b5d98e9afdb933c45
+ wine: 64cb9425da43271109bc1df8df4aa32132f257ae