From 49edf4eda6470e5d976f4205e08f7847de7a2b93 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Thu, 18 Feb 2021 18:55:10 +0100 Subject: [PATCH] shader: Fix string truncatation warning Signed-off-by: Gert Wollny Reviewed-by: Rohan Garg --- src/vrend_shader.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vrend_shader.c b/src/vrend_shader.c index 1d42056..63858f8 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -2897,7 +2897,7 @@ create_swizzled_clipdist(const struct dump_ctx *ctx, const char *prefix, const char *arrayname, int offset) { - char clipdistvec[4][64] = { 0, }; + char clipdistvec[4][80] = { 0, }; char clip_indirect[32] = ""; @@ -2939,9 +2939,9 @@ create_swizzled_clipdist(const struct dump_ctx *ctx, idx = 0; } if (gl_in) - snprintf(clipdistvec[cc], 64, "%sgl_in%s.%s[%s %d]", prefix, arrayname, cc_name, clip_indirect, idx); + snprintf(clipdistvec[cc], 80, "%sgl_in%s.%s[%s %d]", prefix, arrayname, cc_name, clip_indirect, idx); else - snprintf(clipdistvec[cc], 64, "%s%s%s[%s %d]", prefix, arrayname, cc_name, clip_indirect, idx); + snprintf(clipdistvec[cc], 80, "%s%s%s[%s %d]", prefix, arrayname, cc_name, clip_indirect, idx); } strbuf_fmt(result, "%s(vec4(%s,%s,%s,%s))", stypeprefix, clipdistvec[0], clipdistvec[1], clipdistvec[2], clipdistvec[3]); }