On Mon, 19 Jul 2021 at 09:22, Conor McCarthy conor.mccarthy6@bigpond.com wrote:
+static struct vkd3d_string_buffer *vkd3d_dxbc_compiler_binding_error(struct vkd3d_dxbc_compiler *compiler,
enum vkd3d_shader_descriptor_type descriptor_type, const struct vkd3d_shader_register_range *range)
+{
- struct vkd3d_string_buffer *buffer = vkd3d_string_buffer_get(&compiler->string_buffers);
- char range_string[24];
- if (!buffer)
return NULL;
- if (range->last != ~0u)
sprintf(range_string, "[%u:%u]", range->first, range->last);
- else
sprintf(range_string, "[%u:*]", range->first);
One of the major advantages of string buffers is not having to sprintf() to fixed size stack buffers.