summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaizhangNV <149626564+kaizhangNV@users.noreply.github.com>2024-06-04 22:30:59 -0700
committerGitHub <noreply@github.com>2024-06-04 22:30:59 -0700
commitc4a56050f3f5ee9e087554313b3bdc745e575dc5 (patch)
tree92fb9b0e9d2a5dab21f8a254077be08c9c3afa45
parentbacf73cc68af8b7654cc920b07635f926b785b84 (diff)
Use memcpy to replace strncpy_s (#4270)
Use memcpy to replace strncpy_s in SlangProfiler::SlangProfiler to fix the error in Windows.
-rw-r--r--source/core/slang-performance-profiler.cpp2
1 files changed, 1 insertions, 1 deletions
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;