From 6310401aefbeab3941a54bc2e9b58eeb41d733bf Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Wed, 8 Jul 2020 19:24:14 +0000 Subject: [PATCH] tight2: Fix copy-pasta --- src/tight-encoder-v2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tight-encoder-v2.c b/src/tight-encoder-v2.c index d999f75..d6b7039 100644 --- a/src/tight-encoder-v2.c +++ b/src/tight-encoder-v2.c @@ -117,7 +117,7 @@ static int tight_apply_damage(struct tight_encoder_v2* self, /* Align damage to tile grid */ for (uint32_t y = 0; y < self->grid_height; ++y) - for (uint32_t x = 0; x < self->grid_height; ++x) { + for (uint32_t x = 0; x < self->grid_width; ++x) { struct pixman_box16 box = { .x1 = x * 64, .y1 = y * 64, @@ -296,7 +296,7 @@ static void tight_finish_frame(struct tight_encoder_v2* self) tight_encode_rect_count(self); for (uint32_t y = 0; y < self->grid_height; ++y) - for (uint32_t x = 0; x < self->grid_height; ++x) + for (uint32_t x = 0; x < self->grid_width; ++x) if (tight_tile(self, x, y)->state == TIGHT_TILE_ENCODED) tight_finish_tile(self, x, y); } @@ -347,7 +347,7 @@ static int tight_schedule_encode_tile(struct tight_encoder_v2* self, static int tight_schedule_encoding_jobs(struct tight_encoder_v2* self) { for (uint32_t y = 0; y < self->grid_height; ++y) - for (uint32_t x = 0; x < self->grid_height; ++x) + for (uint32_t x = 0; x < self->grid_width; ++x) if (tight_schedule_encode_tile(self, x, y) < 0) return -1;