fix(win32 gui): prevent index out of bounds in d3d11.paint
This commit is contained in:
parent
102a00098e
commit
91eba39019
1 changed files with 1 additions and 1 deletions
|
@ -309,7 +309,7 @@ pub fn paint(
|
||||||
for (0..shader_row_count) |row| {
|
for (0..shader_row_count) |row| {
|
||||||
const src_row = blk: {
|
const src_row = blk: {
|
||||||
const r = top + row;
|
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 src_row_offset = src_row * col_count;
|
||||||
const dst_row_offset = row * shader_col_count;
|
const dst_row_offset = row * shader_col_count;
|
||||||
|
|
Loading…
Add table
Reference in a new issue