nir/spirv: Use the correct length for copying string literals

This commit is contained in:
Jason Ekstrand 2015-05-06 12:36:09 -07:00
parent 7b9c29e440
commit a28f8ad9f1

View file

@ -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 *