[PATCH] Don't crash on Win95
Paul Vriens
Paul.Vriens.Wine at gmail.com
Sat Sep 13 06:07:50 CDT 2008
---
dlls/oleaut32/tests/typelib.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c
index 23bc85d..fc27f78 100644
--- a/dlls/oleaut32/tests/typelib.c
+++ b/dlls/oleaut32/tests/typelib.c
@@ -1278,8 +1278,15 @@ static void test_dump_typelib(const char *name)
ITypeLib *typelib;
int ifcount = sizeof(info)/sizeof(info[0]);
int iface, func;
+ int count;
- MultiByteToWideChar(CP_UTF8, 0, name, -1, wszName, MAX_PATH);
+ SetLastError(0xdeadbeef);
+ count = MultiByteToWideChar(CP_UTF8, 0, name, -1, wszName, MAX_PATH);
+ if (count == 0 && GetLastError() == ERROR_INVALID_PARAMETER)
+ {
+ win_skip("CP_UTF8 is not supported (Win95)\n");
+ return;
+ }
ole_check(LoadTypeLibEx(wszName, REGKIND_NONE, &typelib));
expect_eq(ITypeLib_GetTypeInfoCount(typelib), ifcount, UINT, "%d");
for (iface = 0; iface < ifcount; iface++)
--
1.5.5.1
--------------070308080602000004050902--
More information about the wine-patches
mailing list