From 73e9205f62fe1c94eb3355e7f0b54ef6f6ff3c4b Mon Sep 17 00:00:00 2001
From: quou <quou@disroot.org>
Date: Mon, 17 Mar 2025 21:25:30 +1100
Subject: fix arena_pop

---
 qstd/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qstd/memory.c b/qstd/memory.c
index 87618f9..6db9ad9 100644
--- a/qstd/memory.c
+++ b/qstd/memory.c
@@ -86,7 +86,7 @@ void arena_push(Arena* a) {
 
 void arena_pop(Arena* a) {
 	assert(a->last_push);
-	a->ptr -= a->last_push;
+	a->ptr = a->last_push;
 	a->last_push = *(int*)&a->buf[a->ptr];
 }
 
-- 
cgit v1.2.3-54-g00ecf