From 4b810ae4932367afc8509bc8105603a8d965b0b8 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 9 Dec 2025 08:46:00 +0000 Subject: [PATCH] Add a define for max images and bump to 20 for the moment. --- image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/image.c b/image.c index 43808785..6e2b1701 100644 --- a/image.c +++ b/image.c @@ -25,6 +25,7 @@ static struct images all_images = TAILQ_HEAD_INITIALIZER(all_images); static u_int all_images_count; +#define MAX_IMAGE_COUNT 20 static void image_free(struct image *im) @@ -111,7 +112,7 @@ image_store(struct screen *s, struct sixel_image *si) TAILQ_INSERT_TAIL(&s->images, im, entry); TAILQ_INSERT_TAIL(&all_images, im, all_entry); - if (++all_images_count == 10/*XXX*/) + if (++all_images_count == MAX_IMAGE_COUNT) image_free(TAILQ_FIRST(&all_images)); return (im);