This commit is contained in:
Kovid Goyal 2025-06-15 06:24:35 +05:30
parent 8e55cf7552
commit e63a436ba9
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -860,8 +860,9 @@ halve_multicell_width(Screen *self, index_type x_, index_type y_) {
y_min_limit = expected_y_min_limit;
unsigned new_width = cp[x_].width / 2;
while (cp[x_].x && x_ > 0) x_--;
index_type x_limit = MIN(self->columns, x_ + mcd_x_limit(&cp[x_]));
index_type half_x_limit = MIN(self->columns, x_ + mcd_x_limit(&cp[x_]) / 2);
const index_type ws = mcd_x_limit(&cp[x_]);
const index_type x_limit = MIN(self->columns, x_ + ws);
const index_type half_x_limit = MIN(self->columns, x_ + ws / 2);
int y_max_limit = MIN(self->lines, y_ + cp[x_].scale);
for (int y = y_min_limit + 1; y < y_max_limit; y++) {
Line *line = range_line_(self, y); cp = line->cpu_cells; gp = line->gpu_cells;