summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/font.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/font.c b/firmware/font.c
index cf4a16a517..b7da31b536 100644
--- a/firmware/font.c
+++ b/firmware/font.c
@@ -166,12 +166,12 @@ static struct font* font_load_in_memory(struct font* pf)
166 if ( pf->bits_size < 0xFFDB ) 166 if ( pf->bits_size < 0xFFDB )
167 { 167 {
168 /* pad to 16-bit boundary */ 168 /* pad to 16-bit boundary */
169 fileptr = (unsigned char *)(((int32_t)fileptr + 1) & ~1); 169 fileptr = (unsigned char *)(((intptr_t)fileptr + 1) & ~1);
170 } 170 }
171 else 171 else
172 { 172 {
173 /* pad to 32-bit boundary*/ 173 /* pad to 32-bit boundary*/
174 fileptr = (unsigned char *)(((int32_t)fileptr + 3) & ~3); 174 fileptr = (unsigned char *)(((intptr_t)fileptr + 3) & ~3);
175 } 175 }
176 176
177 if (noffset) 177 if (noffset)
@@ -246,13 +246,13 @@ static struct font* font_load_cached(struct font* pf)
246 { 246 {
247 long_offset = 0; 247 long_offset = 0;
248 /* pad to 16-bit boundary */ 248 /* pad to 16-bit boundary */
249 fileptr = (unsigned char *)(((int32_t)fileptr + 1) & ~1); 249 fileptr = (unsigned char *)(((intptr_t)fileptr + 1) & ~1);
250 } 250 }
251 else 251 else
252 { 252 {
253 long_offset = 1; 253 long_offset = 1;
254 /* pad to 32-bit boundary*/ 254 /* pad to 32-bit boundary*/
255 fileptr = (unsigned char *)(((int32_t)fileptr + 3) & ~3); 255 fileptr = (unsigned char *)(((intptr_t)fileptr + 3) & ~3);
256 } 256 }
257 257
258 if (noffset) 258 if (noffset)