Module: vkd3d Branch: master Commit: 5d9398e10ca38df956e746d4ee51f6c71d56819a URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=5d9398e10ca38df956e746d4... Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Oct 15 15:24:32 2020 -0500 include: Clarify that struct vkd3d_shader_code is not null-terminated. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/vkd3d_shader.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/vkd3d_shader.h b/include/vkd3d_shader.h index 7b95896..74e2eb0 100644 --- a/include/vkd3d_shader.h +++ b/include/vkd3d_shader.h @@ -155,7 +155,13 @@ enum vkd3d_shader_visibility /** A generic structure containing a GPU shader, in text or byte-code format. */ struct vkd3d_shader_code { - /** Pointer to the code. */ + /** + * Pointer to the code. Note that textual formats are not null-terminated. + * Therefore \a size should not include a null terminator, when this + * structure is passed as input to a vkd3d-shader function, and the + * allocated string will not include a null terminator when this structure + * is used as output. + */ const void *code; /** Size of \a code, in bytes. */ size_t size;