diff --git a/src/conio/bitmap_con.c b/src/conio/bitmap_con.c index 16af30700d38c27350924d88b14174e87b360180..4e4714b4d7335a69b2731788401e1ab2824708e1 100644 --- a/src/conio/bitmap_con.c +++ b/src/conio/bitmap_con.c @@ -1663,6 +1663,8 @@ bitmap_largest_mult_inside(int maxwidth, int maxheight) mult = maxwidth / vstat.scrnwidth; else mult = maxheight / vstat.scrnheight; + if (mult < 1) + mult = 1; for (;mult > 1; mult--) { bitmap_get_scaled_win_size(mult, &w, &h, 0, 0); if (w <= maxwidth && h <= maxheight) diff --git a/src/conio/x_events.c b/src/conio/x_events.c index dc7cc501458175c5fef79aa16e16917b19e98420..da46ab3365bc9dc4dd74611c1fb2ab73543eb202 100644 --- a/src/conio/x_events.c +++ b/src/conio/x_events.c @@ -542,7 +542,7 @@ static int video_init() lot easier. */ pthread_mutex_lock(&vstatlock); - if (x_cvstat.scaling < 1) + if (x_cvstat.scaling < 1 || vstat.scaling < 1) x_cvstat.scaling = vstat.scaling = 1; if (ciolib_initial_scaling) x_cvstat.scaling = vstat.scaling = ciolib_initial_scaling;