summaryrefslogtreecommitdiffstats
path: root/video/out/gpu/spirv.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/gpu/spirv.c')
-rw-r--r--video/out/gpu/spirv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/gpu/spirv.c b/video/out/gpu/spirv.c
index e20fbe7483..06d33686d0 100644
--- a/video/out/gpu/spirv.c
+++ b/video/out/gpu/spirv.c
@@ -65,7 +65,7 @@ bool spirv_compiler_init(struct ra_ctx *ctx)
ctx->spirv->fns = compilers[i];
const char *name = m_opt_choice_str(compiler_choices, i);
- strncpy(ctx->spirv->name, name, sizeof(ctx->spirv->name));
+ strncpy(ctx->spirv->name, name, sizeof(ctx->spirv->name) - 1);
MP_VERBOSE(ctx, "Initializing SPIR-V compiler '%s'\n", name);
if (ctx->spirv->fns->init(ctx))
return true;