[Horus] Array initialization when loading a bitmap fails
This commit is contained in:
+4
-2
@@ -196,6 +196,10 @@ const char * bmpLoad(uint8_t * bmp, const char * filename, uint16_t width, uint1
|
||||
uint8_t palette[16];
|
||||
uint8_t bmpBuf[LCD_W]; /* maximum with LCD_W */
|
||||
uint8_t *buf = &bmpBuf[0];
|
||||
uint16_t * dest = (uint16_t *)bmp;
|
||||
|
||||
dest[0] = 0;
|
||||
dest[1] = 0;
|
||||
|
||||
if (width > LCD_W) {
|
||||
return STR_INCOMPATIBLE;
|
||||
@@ -302,8 +306,6 @@ const char * bmpLoad(uint8_t * bmp, const char * filename, uint16_t width, uint1
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t * dest = (uint16_t *)bmp;
|
||||
|
||||
*dest++ = w;
|
||||
*dest++ = h;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user