diff options
Diffstat (limited to 'firmware/font.c')
-rw-r--r-- | firmware/font.c | 4 |
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); |