spirv-tools/SOURCES/spirv-tools-gcc11.patch
2021-12-09 15:26:21 +00:00

14 lines
464 B
Diff

diff --git a/source/diagnostic.cpp b/source/diagnostic.cpp
index edc27c8..77c29d7 100644
--- a/source/diagnostic.cpp
+++ b/source/diagnostic.cpp
@@ -37,7 +37,7 @@ spv_diagnostic spvDiagnosticCreate(const spv_position position,
diagnostic->position = *position;
diagnostic->isTextSource = false;
memset(diagnostic->error, 0, length);
- strncpy(diagnostic->error, message, length);
+ memcpy(diagnostic->error, message, length);
return diagnostic;
}