limit font_cache preloading to cache capacity

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27909 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Fred Bauer 2010-08-27 15:10:30 +00:00
parent 9067fe3031
commit edb28753b0

View file

@ -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);
}
}