recycling malloc so imageptr would not be null, imageptr is ovewerwritten by tjDecompress2 inner malloc so copy is made
This commit is contained in:
parent
7a959263de
commit
1b5224e95a
@ -323,7 +323,8 @@ bool menuEntryLoad(menuEntry_s* me, const char* name, bool shortcut) {
|
|||||||
|
|
||||||
void menuEntryParseIcon(menuEntry_s* me) {
|
void menuEntryParseIcon(menuEntry_s* me) {
|
||||||
size_t imagesize = 256*256*3;
|
size_t imagesize = 256*256*3;
|
||||||
unsigned char imageptr[imagesize];
|
unsigned char *imageptr = (unsigned char*)malloc(imagesize);//imageptr cannot be null
|
||||||
|
me->icon_gfx = (uint8_t*)imageptr;
|
||||||
int w,h,samp;
|
int w,h,samp;
|
||||||
|
|
||||||
if (me->icon_size==0 || me->icon==NULL) return;
|
if (me->icon_size==0 || me->icon==NULL) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user