From 6fc7911d1565214c9921cfc9da3df37718839184 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 6 May 2015 12:36:09 -0700 Subject: [PATCH] nir/spirv: Use the correct length for copying string literals --- src/glsl/nir/spirv_to_nir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/nir/spirv_to_nir.c b/src/glsl/nir/spirv_to_nir.c index 03ef4c45dd1..3d2a26c90b0 100644 --- a/src/glsl/nir/spirv_to_nir.c +++ b/src/glsl/nir/spirv_to_nir.c @@ -57,7 +57,7 @@ static char * vtn_string_literal(struct vtn_builder *b, const uint32_t *words, unsigned word_count) { - return ralloc_strndup(b, (char *)words, (word_count - 2) * sizeof(*words)); + return ralloc_strndup(b, (char *)words, word_count * sizeof(*words)); } static const uint32_t * -- 2.30.2