* src/ui/window.c (Fwindow_displayed_text_pixel_height): Make sure
no division by 0 is attempted and use "best heuristic" of just
adding 3.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
|| Dynarr_atp(cache, i)->end >= eobuf)
return make_int(height);
}
-
+
/* get here => need more cache lines. try again. */
assert(height > prev_height); /* progress? */
prev_height = height;
-
- needed +=
- ((hlimit - height) * (nelt - elt) + height - 1) / height +
- 3;
+
+ needed += 3;
+ if ( height != 0)
+ needed += ((hlimit - height) *
+ (nelt - elt) +
+ height - 1) / height;
}
RETURN_NOT_REACHED(make_int(0)) /* shut up compiler */