Commit 5d4de2ac authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

msvcrt: Use parameter checking macros in vsn(w)printf_s_l.

parent 4c337fb4
......@@ -1050,7 +1050,7 @@ int CDECL MSVCRT_vsnprintf_s_l( char *str, MSVCRT_size_t sizeOfBuffer,
if(ret<0 || ret==len) {
if(count!=MSVCRT__TRUNCATE && count>sizeOfBuffer) {
MSVCRT__invalid_parameter( NULL, NULL, NULL, 0, 0 );
MSVCRT_INVALID_PMT("str[sizeOfBuffer] is too small");
*MSVCRT__errno() = MSVCRT_ERANGE;
memset(str, 0, sizeOfBuffer);
} else
......@@ -1188,7 +1188,7 @@ int CDECL MSVCRT_vsnwprintf_s_l( MSVCRT_wchar_t *str, MSVCRT_size_t sizeOfBuffer
if(ret<0 || ret==len) {
if(count!=MSVCRT__TRUNCATE && count>sizeOfBuffer) {
MSVCRT__invalid_parameter( NULL, NULL, NULL, 0, 0 );
MSVCRT_INVALID_PMT("str[sizeOfBuffer] is too small");
*MSVCRT__errno() = MSVCRT_ERANGE;
memset(str, 0, sizeOfBuffer*sizeof(MSVCRT_wchar_t));
} else
......
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