Skip to content

Commit 57096f4

Browse files
committed
Fixed pointer regression
1 parent b5d59a3 commit 57096f4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/FastEPD.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1515,6 +1515,7 @@ int bbepSetPanelSize(FASTEPDSTATE *pState, int width, int height, int flags, int
15151515
#else
15161516
pState->pCurrent = (uint8_t *)heap_caps_aligned_alloc(16, (pState->width * pState->height) / 2, MALLOC_CAP_SPIRAM); // current pixels
15171517
if (!pState->pCurrent) return BBEP_ERROR_NO_MEMORY;
1518+
pState->pTemp = (uint8_t *)heap_caps_aligned_alloc(16, (pState->width * pState->height) / 4, MALLOC_CAP_SPIRAM); // LUT data
15181519
if (pState->iPanelType == BB_PANEL_IT8951) {
15191520
pState->pfnSetPixel = bbepSetPixel2Clr;
15201521
pState->pfnSetPixelFast = bbepSetPixelFast2Clr;
@@ -1523,7 +1524,6 @@ int bbepSetPanelSize(FASTEPDSTATE *pState, int width, int height, int flags, int
15231524
pState->rotation = 0;
15241525
return BBEP_SUCCESS; // for it8951 only
15251526
}
1526-
pState->pTemp = (uint8_t *)heap_caps_aligned_alloc(16, (pState->width * pState->height) / 4, MALLOC_CAP_SPIRAM); // LUT data
15271527
#endif // !__LINUX__
15281528
pState->pPrevious = &pState->pCurrent[(width/4) * height]; // comparison with previous buffer (only 1-bpp mode)
15291529

0 commit comments

Comments
 (0)