From c4a56050f3f5ee9e087554313b3bdc745e575dc5 Mon Sep 17 00:00:00 2001 From: kaizhangNV <149626564+kaizhangNV@users.noreply.github.com> Date: Tue, 4 Jun 2024 22:30:59 -0700 Subject: Use memcpy to replace strncpy_s (#4270) Use memcpy to replace strncpy_s in SlangProfiler::SlangProfiler to fix the error in Windows. --- source/core/slang-performance-profiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/slang-performance-profiler.cpp b/source/core/slang-performance-profiler.cpp index f8e934491..faf06bb92 100644 --- a/source/core/slang-performance-profiler.cpp +++ b/source/core/slang-performance-profiler.cpp @@ -65,7 +65,7 @@ namespace Slang if (strSize > 0) { - strncpy_s(profileEntry.funcName, strSize, func.key, strSize); + memcpy(profileEntry.funcName, func.key, strSize); } profileEntry.invocationCount = func.value.invocationCount; profileEntry.duration = func.value.duration; -- cgit v1.2.3