msvcrt: Correctly terminate string in wcsncat_s.
This commit is contained in:
parent
fdffe548f1
commit
da4ed47076
|
@ -1716,7 +1716,7 @@ INT CDECL MSVCRT_wcsncat_s(MSVCRT_wchar_t *dst, MSVCRT_size_t elem,
|
||||||
if (srclen < (elem - dststart))
|
if (srclen < (elem - dststart))
|
||||||
{
|
{
|
||||||
memcpy(&dst[dststart], src, srclen*sizeof(MSVCRT_wchar_t));
|
memcpy(&dst[dststart], src, srclen*sizeof(MSVCRT_wchar_t));
|
||||||
dst[srclen] = '\0';
|
dst[dststart+srclen] = '\0';
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
MSVCRT_INVALID_PMT("dst[elem] is too small");
|
MSVCRT_INVALID_PMT("dst[elem] is too small");
|
||||||
|
|
Loading…
Reference in New Issue