Commit a4fad541 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Don't write past the end of the buffer's conversion_map.

parent 5f7e0876
......@@ -275,12 +275,13 @@ static BOOL buffer_process_converted_attribute(struct wined3d_buffer *This,
attrib_size = attrib->format_desc->component_count * attrib->format_desc->component_size;
for (i = 0; i < attrib_size; ++i)
{
if (This->conversion_map[data + i] != conversion_type)
DWORD_PTR idx = (data + i) % This->stride;
if (This->conversion_map[idx] != conversion_type)
{
TRACE("Byte %ld in vertex changed\n", i + data);
TRACE("It was type %d, is %d now\n", This->conversion_map[data + i], conversion_type);
TRACE("Byte %ld in vertex changed\n", idx);
TRACE("It was type %d, is %d now\n", This->conversion_map[idx], conversion_type);
ret = TRUE;
This->conversion_map[data + i] = conversion_type;
This->conversion_map[idx] = conversion_type;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment