Commit 4c337fb4 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

msvcrt: Use parameter checking macros in wcstombs_s_l.

parent 16c89a54
......@@ -298,8 +298,7 @@ MSVCRT_size_t CDECL MSVCRT__wcstombs_s_l(MSVCRT_size_t *ret, char *mbstr,
return 0;
}
if(!wcstr || !mbstr) {
MSVCRT__invalid_parameter(NULL, NULL, NULL, 0, 0);
if (!MSVCRT_CHECK_PMT(wcstr != NULL) || !MSVCRT_CHECK_PMT(mbstr != NULL)) {
if(mbstr && size)
mbstr[0] = '\0';
*MSVCRT__errno() = MSVCRT_EINVAL;
......@@ -317,7 +316,7 @@ MSVCRT_size_t CDECL MSVCRT__wcstombs_s_l(MSVCRT_size_t *ret, char *mbstr,
else if(conv==size && (count==MSVCRT__TRUNCATE || mbstr[conv-1]=='\0'))
mbstr[conv-1] = '\0';
else {
MSVCRT__invalid_parameter(NULL, NULL, NULL, 0, 0);
MSVCRT_INVALID_PMT("mbstr[size] is too small");
if(size)
mbstr[0] = '\0';
*MSVCRT__errno() = MSVCRT_ERANGE;
......
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