fix(win32 gui): prevent index out of bounds in d3d11.paint

This commit is contained in:
CJ van den Berg 2025-01-20 19:46:22 +01:00
parent 102a00098e
commit 91eba39019
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -309,7 +309,7 @@ pub fn paint(
for (0..shader_row_count) |row| {
const src_row = blk: {
const r = top + row;
break :blk r - if (r >= row_count) row_count else 0;
break :blk if (r < row_count) r else 0;
};
const src_row_offset = src_row * col_count;
const dst_row_offset = row * shader_col_count;