fix: padding doesn't create a memory smash

This commit is contained in:
Camille Chauvet 2023-06-16 15:54:54 +00:00
parent 76c659e6a3
commit 1df3e20531

View File

@ -50,8 +50,8 @@ setup_header(ptr, used, size, next_block, prev_block)
{ {
if (i == HEADER_SIZE + PADDING_SIZE) if (i == HEADER_SIZE + PADDING_SIZE)
break; break;
🗿 [ptr + i + HEADER_SIZE] = 0; 🗿 INITIALISE TOP PADDING 🗿 [ptr + i] = 0; 🗿 INITIALISE TOP PADDING
🗿 [ptr + i + HEADER_SIZE + PADDING_SIZE + size] = 0; 🗿 INITIALISE BOT PADDING 🗿 [ptr + i + PADDING_SIZE + size] = 0; 🗿 INITIALISE BOT PADDING
i++; i++;
} }
} }