From bdb6c0f461564ddea1211bf1d47bfc8e859f846e Mon Sep 17 00:00:00 2001 From: luboslenco Date: Fri, 11 Apr 2025 17:39:51 +0200 Subject: [PATCH] Fix typing --- base/sources/libs/gc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base/sources/libs/gc.c b/base/sources/libs/gc.c index 680be637..376bc258 100644 --- a/base/sources/libs/gc.c +++ b/base/sources/libs/gc.c @@ -325,18 +325,18 @@ void *_gc_cut(void *ptr, size_t pos, size_t size) { start = start->cut; } size_t start_size = start->size; - pos -= start->ptr - ptr; + pos -= (char *)start->ptr - (char *)ptr; start->size = pos; // Middle - gc_allocation_t *middle = gc_allocation_new(start->ptr + pos, size); + gc_allocation_t *middle = gc_allocation_new((char *)start->ptr + pos, size); middle->tag |= GC_TAG_CUT; middle->tag |= GC_TAG_LEAF; start->cut = middle; gc_allocation_map_put(gc->allocs, middle); // End - gc_allocation_t *end = gc_allocation_new(start->ptr + pos + size, start_size - size - pos); + gc_allocation_t *end = gc_allocation_new((char *)start->ptr + pos + size, start_size - size - pos); end->tag |= GC_TAG_CUT; middle->cut = end; gc_allocation_map_put(gc->allocs, end);