From d023bf0f5dedb67caf9229e3ddcbb5a9fea420ce Mon Sep 17 00:00:00 2001 From: Bertrik Sikken Date: Sun, 10 Jun 2012 17:15:47 +0200 Subject: Fix checks on buflib allocated handles (0 is not a valid handle value) Change-Id: I8fdc5a59a5062f40a431cd49971390e21631b8ec --- firmware/font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'firmware') diff --git a/firmware/font.c b/firmware/font.c index 4b21f0ffe3..06f104054f 100644 --- a/firmware/font.c +++ b/firmware/font.c @@ -514,7 +514,7 @@ int font_load_ex( const char *path, size_t buf_size, int glyphs ) int handle = core_alloc_ex( path, bufsize + sizeof( struct buflib_alloc_data ), &buflibops ); - if ( handle < 0 ) + if ( handle <= 0 ) { return -1; } -- cgit v1.2.3