diff --git a/test_conformance/extensions/cl_khr_command_buffer/command_buffer_printf.cpp b/test_conformance/extensions/cl_khr_command_buffer/command_buffer_printf.cpp index eef3e3558b..80fac2ada1 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/command_buffer_printf.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/command_buffer_printf.cpp @@ -426,7 +426,7 @@ struct CommandBufferPrintfTest : public BasicCommandBufferTest std::max(min_pattern_length, rand() % max_pattern_length); std::vector pattern(pattern_length + 1, pattern_character); - pattern[pattern_length] = '\0'; + pattern.back() = '\0'; simul_passes[i] = { pattern, { cl_int(i * offset), cl_int(pattern_length) }, std::vector(num_elements