summaryrefslogtreecommitdiffstats
path: root/firmware/font.c
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2012-06-10 17:15:47 +0200
committerBertrik Sikken <bertrik@sikken.nl>2012-06-10 17:15:47 +0200
commitd023bf0f5dedb67caf9229e3ddcbb5a9fea420ce (patch)
tree3562a23f7eb6009e161cbc8aae943de33d168b91 /firmware/font.c
parent900cf6d52bd806bd54ad2118e245cd3465ea6815 (diff)
downloadrockbox-d023bf0f5dedb67caf9229e3ddcbb5a9fea420ce.tar.gz
rockbox-d023bf0f5dedb67caf9229e3ddcbb5a9fea420ce.tar.bz2
rockbox-d023bf0f5dedb67caf9229e3ddcbb5a9fea420ce.zip
Fix checks on buflib allocated handles (0 is not a valid handle value)
Change-Id: I8fdc5a59a5062f40a431cd49971390e21631b8ec
Diffstat (limited to 'firmware/font.c')
-rw-r--r--firmware/font.c2
1 files changed, 1 insertions, 1 deletions
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;
}