From 19c45099db0b0577457e905991606be9ab622064 Mon Sep 17 00:00:00 2001 From: J Reece Wilson Date: Sat, 12 Sep 2020 03:46:51 +0100 Subject: [PATCH] idc about this can i sleep yet --- PlatformSupport/ClangMemCpy_s.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PlatformSupport/ClangMemCpy_s.hpp b/PlatformSupport/ClangMemCpy_s.hpp index 943319c..a97840a 100644 --- a/PlatformSupport/ClangMemCpy_s.hpp +++ b/PlatformSupport/ClangMemCpy_s.hpp @@ -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; } \ No newline at end of file