summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/font.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/firmware/font.c b/firmware/font.c
index 9d46e0d..cb1ade0 100644
--- a/firmware/font.c
+++ b/firmware/font.c
@@ -67,14 +67,15 @@ static int readshort(unsigned short *sp)
return (fileptr <= eofptr);
}
-static int readlong(unsigned long *lp)
+static long readlong(unsigned long *lp)
{
unsigned long l;
l = *fileptr++ & 0xff;
l |= *fileptr++ << 8;
- l |= *fileptr++ << 16;
- *lp = (*fileptr++ << 24) | l;
+ l |= ((unsigned long)(*fileptr++)) << 16;
+ l |= ((unsigned long)(*fileptr++)) << 24;
+ *lp = l;
return (fileptr <= eofptr);
}