From 738135659434506489bef0d9a4167dfdf104d187 Mon Sep 17 00:00:00 2001 From: nick black Date: Sun, 13 Jun 2021 15:51:08 -0400 Subject: [PATCH] check for sixel_maxy before clamping; fixes MLTerm sixel --- src/lib/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/internal.h b/src/lib/internal.h index 856c0578f..f9c5099e7 100644 --- a/src/lib/internal.h +++ b/src/lib/internal.h @@ -944,7 +944,7 @@ clamp_to_sixelmax(const tinfo* t, int* y, int* x, int* outy, ncscale_e scaling){ *outy = *y; if(*outy % t->sprixel_scale_height){ *outy += t->sprixel_scale_height - (*outy % t->sprixel_scale_height); - while(*outy > t->sixel_maxy){ + while(t->sixel_maxy && *outy > t->sixel_maxy){ *outy -= t->sprixel_scale_height; } if(scaling == NCSCALE_STRETCH || *y > *outy){