From edb28753b07a927a9f797c99ec97061499c67d84 Mon Sep 17 00:00:00 2001 From: Fred Bauer Date: Fri, 27 Aug 2010 15:10:30 +0000 Subject: limit font_cache preloading to cache capacity git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27909 a1c6a512-1295-4272-9138-f99709370657 --- 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 98bd6399fe..77cf66c737 100644 --- a/firmware/font.c +++ b/firmware/font.c @@ -723,7 +723,7 @@ static void glyph_cache_load(struct font* pf) close(fd); } else { /* load latin1 chars into cache */ - for ( ch = 32 ; ch < 256 ; ch++ ); + for ( ch = 32 ; ch < 256 && ch < pf->cache._capacity + 32; ch++ ) font_get_bits(pf, ch); } } -- cgit v1.2.3