mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 07:55:45 +01:00
should set the spare chunk to 0x400, not 0
This commit is contained in:
@@ -68,7 +68,7 @@ size_t mcx_delchunk_bulk(u8 *restrict buf, const u16 *restrict chunks, int chunk
|
||||
u16 chunkids[chunkc + 1];
|
||||
memcpy(chunkids, chunks, chunkc);
|
||||
qsort(chunkids, chunkc, sizeof(int), cmp_chunkids);
|
||||
chunkids[chunkc] = 0; // set the spare chunk to zero, to prevent out-of-bounds access
|
||||
chunkids[chunkc] = 0x400; // set the spare chunk to the max chunks, so the rest of the chunks are moved
|
||||
|
||||
size_t rmb = 0;
|
||||
for (int i = 0; i < chunkc; i++)
|
||||
|
||||
Reference in New Issue
Block a user