spirv-tools/spirv-tools-gcc11.patch
2020-12-04 21:42:01 -07: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;
}