diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2012-06-10 17:15:47 +0200 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2012-06-10 17:15:47 +0200 |
commit | d023bf0f5dedb67caf9229e3ddcbb5a9fea420ce (patch) | |
tree | 3562a23f7eb6009e161cbc8aae943de33d168b91 /firmware | |
parent | 900cf6d52bd806bd54ad2118e245cd3465ea6815 (diff) | |
download | rockbox-d023bf0f5dedb67caf9229e3ddcbb5a9fea420ce.tar.gz rockbox-d023bf0f5dedb67caf9229e3ddcbb5a9fea420ce.zip |
Fix checks on buflib allocated handles (0 is not a valid handle value)
Change-Id: I8fdc5a59a5062f40a431cd49971390e21631b8ec
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/font.c | 2 |
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 ) | |||
514 | int handle = core_alloc_ex( path, | 514 | int handle = core_alloc_ex( path, |
515 | bufsize + sizeof( struct buflib_alloc_data ), | 515 | bufsize + sizeof( struct buflib_alloc_data ), |
516 | &buflibops ); | 516 | &buflibops ); |
517 | if ( handle < 0 ) | 517 | if ( handle <= 0 ) |
518 | { | 518 | { |
519 | return -1; | 519 | return -1; |
520 | } | 520 | } |