idc about this can i sleep yet

This commit is contained in:
Reece Wilson 2020-09-12 03:46:51 +01:00
parent 0b9cfa556e
commit 19c45099db

View File

@ -3,11 +3,10 @@
static int memcpy_s(void * dest, size_t destsz,
const void * src, size_t count)
{
size_t minVal = std::min(destsz, count);
if (count > destsz)
{
return 1;
}
std::memcpy(dest, src, minVal);
std::memcpy(dest, src, std::min(destsz, count));
return 0;
}