From 3af72ff5f8ad2c4b4460ca5ef1ff1189dfee17ee Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 17 Apr 2006 12:41:50 +0000 Subject: [PATCH] * Fixed abusive strictness in the font loader. --- cucul/font.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cucul/font.c b/cucul/font.c index abf912a..8a16b31 100644 --- a/cucul/font.c +++ b/cucul/font.c @@ -180,8 +180,8 @@ cucul_font_t *cucul_load_font(void const *data, unsigned int size) if(f->glyph_list[i].data_offset >= f->header.data_size || f->glyph_list[i].data_offset - + f->glyph_list[i].width * f->glyph_list[i].height * - f->header.bpp / 8 >= f->header.data_size) + + (f->glyph_list[i].width * f->glyph_list[i].height * + f->header.bpp + 7) / 8 > f->header.data_size) { free(f->glyph_list); free(f->block_list); @@ -433,4 +433,4 @@ void cucul_render_canvas(cucul_t *qq, cucul_font_t *f, * }; */ -#endif \ No newline at end of file +#endif