summaryrefslogtreecommitdiffstats
path: root/firmware/font.c
diff options
context:
space:
mode:
authorFred Bauer <fred.w.bauer@gmail.com>2010-08-27 15:10:30 +0000
committerFred Bauer <fred.w.bauer@gmail.com>2010-08-27 15:10:30 +0000
commitedb28753b07a927a9f797c99ec97061499c67d84 (patch)
treef816c101f65276283aad890e8afd77ff4fe3727d /firmware/font.c
parent9067fe30313412dfa454bfeac64f409d0d1b96e5 (diff)
downloadrockbox-edb28753b07a927a9f797c99ec97061499c67d84.tar.gz
rockbox-edb28753b07a927a9f797c99ec97061499c67d84.tar.bz2
rockbox-edb28753b07a927a9f797c99ec97061499c67d84.zip
limit font_cache preloading to cache capacity
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27909 a1c6a512-1295-4272-9138-f99709370657
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 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);
}
}