Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2026-05-12 12:01:11 +01:00
5 changed files with 15 additions and 11 deletions

View File

@@ -1112,11 +1112,17 @@ screen_redraw_draw_scrollbar(struct screen_redraw_ctx *ctx,
if (sb_x >= sx || sb_y >= sy)
return;
imax = sb_w + sb_pad;
if ((int)imax + sb_x > sx)
if ((int)imax + sb_x > sx) {
if (sb_x >= sx)
return;
imax = sx - sb_x;
}
jmax = sb_h;
if ((int)jmax + sb_y > sy)
if ((int)jmax + sb_y > sy) {
if (sb_y >= sy)
return;
jmax = sy - sb_y;
}
for (j = 0; j < jmax; j++) {
py = sb_y + j;