1
0
Fork 0
mirror of https://github.com/CTCaer/hekate.git synced 2024-11-09 12:01:45 +00:00

bdk: fatfs: always align malloc to lba

This commit is contained in:
CTCaer 2024-03-12 15:43:44 +02:00
parent 7d1600b85c
commit 25b7ffecd1

View file

@ -18,7 +18,8 @@ void* ff_memalloc ( /* Returns pointer to the allocated memory block (null if no
UINT msize /* Number of bytes to allocate */ UINT msize /* Number of bytes to allocate */
) )
{ {
return malloc(msize); /* Allocate a new memory block with POSIX API */ // Ensure size is aligned to SDMMC block size.
return malloc(ALIGN(msize, 512)); /* Allocate a new memory block with POSIX API */
} }