From 99aa400f26261d4a6e750f23b378f4090f0fc720 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Fri, 14 Apr 2006 07:33:48 +0000 Subject: [PATCH] * Only support version 1 fonts. --- cucul/font.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cucul/font.c b/cucul/font.c index 703a32e..ef9c865 100644 --- a/cucul/font.c +++ b/cucul/font.c @@ -137,7 +137,8 @@ struct cucul_font *cucul_load_font(void const *data, unsigned int size) if(size != 8 + f->header.control_size + f->header.data_size || (f->header.bpp != 8 && f->header.bpp != 4 && - f->header.bpp != 2 && f->header.bpp != 1)) + f->header.bpp != 2 && f->header.bpp != 1) + || (flags & 1) == 0) { free(f); return NULL;