summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-05-06 12:36:09 -0700
committerJason Ekstrand <[email protected]>2015-05-16 11:16:34 -0700
commita28f8ad9f1cce99e38c93fa5bf2892056861414c (patch)
tree9d9e722bc74ba89e6e279a502205eb00a62d0b0c /src
parent7b9c29e440d2ef3d2bd476ebd9ff06586f396da5 (diff)
nir/spirv: Use the correct length for copying string literals
Diffstat (limited to 'src')
-rw-r--r--src/glsl/nir/spirv_to_nir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/nir/spirv_to_nir.c b/src/glsl/nir/spirv_to_nir.c
index 62d377ed243..d4bad887dc1 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 *