diff --git a/main.c b/main.c index 60be449..3821143 100644 --- a/main.c +++ b/main.c @@ -100,7 +100,7 @@ void free(void* ptr) if (!ptr) return; - struct block* b = ptr - 1; + struct block* b = (struct block*)ptr - 1; b->free = 1; struct block* link = b->next;