summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/til_fb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/til_fb.c b/src/til_fb.c
index 011e9ce..a6bdf69 100644
--- a/src/til_fb.c
+++ b/src/til_fb.c
@@ -574,7 +574,7 @@ void * til_fb_context(til_fb_t *fb)
/* helpers for fragmenting incrementally */
int til_fb_fragment_slice_single(const til_fb_fragment_t *fragment, unsigned n_fragments, unsigned number, til_fb_fragment_t *res_fragment)
{
- unsigned slice = fragment->height / n_fragments;
+ unsigned slice = MAX(fragment->height / n_fragments, 1);
unsigned yoff = slice * number;
assert(fragment);
© All Rights Reserved