Commit 0cb50676 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Don't raise exception in _invalid_parameter.

parent 1ca38f1d
...@@ -437,7 +437,9 @@ void __cdecl MSVCRT__invalid_parameter(const MSVCRT_wchar_t *expr, const MSVCRT_ ...@@ -437,7 +437,9 @@ void __cdecl MSVCRT__invalid_parameter(const MSVCRT_wchar_t *expr, const MSVCRT_
else else
{ {
ERR( "%s:%u %s: %s %lx\n", debugstr_w(file), line, debugstr_w(func), debugstr_w(expr), arg ); ERR( "%s:%u %s: %s %lx\n", debugstr_w(file), line, debugstr_w(func), debugstr_w(expr), arg );
#if _MSVCR_VER > 0
RaiseException( STATUS_INVALID_CRUNTIME_PARAMETER, EXCEPTION_NONCONTINUABLE, 0, NULL ); RaiseException( STATUS_INVALID_CRUNTIME_PARAMETER, EXCEPTION_NONCONTINUABLE, 0, NULL );
#endif
} }
} }
......
...@@ -30,6 +30,8 @@ static int (__cdecl *p_get_doserrno)(int *); ...@@ -30,6 +30,8 @@ static int (__cdecl *p_get_doserrno)(int *);
static int (__cdecl *p_get_errno)(int *); static int (__cdecl *p_get_errno)(int *);
static int (__cdecl *p_set_doserrno)(int); static int (__cdecl *p_set_doserrno)(int);
static int (__cdecl *p_set_errno)(int); static int (__cdecl *p_set_errno)(int);
static void (__cdecl *p__invalid_parameter)(const wchar_t*,
const wchar_t*, const wchar_t*, unsigned int, uintptr_t);
static void init(void) static void init(void)
{ {
...@@ -42,6 +44,7 @@ static void init(void) ...@@ -42,6 +44,7 @@ static void init(void)
p_get_errno = (void *)GetProcAddress(hmod, "_get_errno"); p_get_errno = (void *)GetProcAddress(hmod, "_get_errno");
p_set_doserrno = (void *)GetProcAddress(hmod, "_set_doserrno"); p_set_doserrno = (void *)GetProcAddress(hmod, "_set_doserrno");
p_set_errno = (void *)GetProcAddress(hmod, "_set_errno"); p_set_errno = (void *)GetProcAddress(hmod, "_set_errno");
p__invalid_parameter = (void *)GetProcAddress(hmod, "_invalid_parameter");
} }
static void test_rand_s(void) static void test_rand_s(void)
...@@ -341,6 +344,16 @@ static void test__popen(const char *name) ...@@ -341,6 +344,16 @@ static void test__popen(const char *name)
ok(errno == EBADF, "errno = %d\n", errno); ok(errno == EBADF, "errno = %d\n", errno);
} }
static void test__invalid_parameter(void)
{
if(!p__invalid_parameter) {
win_skip("_invalid_parameter not available\n");
return;
}
p__invalid_parameter(NULL, NULL, NULL, 0, 0);
}
START_TEST(misc) START_TEST(misc)
{ {
int arg_c; int arg_c;
...@@ -366,4 +379,5 @@ START_TEST(misc) ...@@ -366,4 +379,5 @@ START_TEST(misc)
test__set_doserrno(); test__set_doserrno();
test__set_errno(); test__set_errno();
test__popen(arg_v[0]); test__popen(arg_v[0]);
test__invalid_parameter();
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment