summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-10-08 15:42:40 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-10-08 15:42:40 +0000
commitdea31222b8318cd992f97cfe81b9c2239233f884 (patch)
treed7a0d7fcc0b34249322964d55b3cc6f6b2e7d3bd /firmware
parentb9d6830eddfa460d573f8af2020d17a9431dc056 (diff)
Added persistence of last .wps, .fnt and .lng file played in /.rockbox
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2535 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/font.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/font.c b/firmware/font.c
index 72c7085b7a..6f5156cc73 100644
--- a/firmware/font.c
+++ b/firmware/font.c
@@ -125,8 +125,6 @@ struct font* font_load(char *path)
char copyright[256+1];
struct font* pf = &font_ui;
- memset(pf, 0, sizeof(struct font));
-
/* open and read entire font file*/
fd = open(path, O_RDONLY|O_BINARY);
if (fd < 0) {
@@ -134,6 +132,8 @@ struct font* font_load(char *path)
return NULL;
}
+ memset(pf, 0, sizeof(struct font));
+
/* currently, font loading replaces earlier font allocation*/
freeptr = (unsigned char *)(((int)mbuf + 3) & ~3);