From 98f08084b5bbc34934d2262eda9bf79afa55b972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Fri, 31 Jul 2026 18:23:17 +0200 Subject: [PATCH] Assert on overflow in str_concat --- src/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/string.c b/src/string.c index ad11d54..49fdc9b 100644 --- a/src/string.c +++ b/src/string.c @@ -19,7 +19,7 @@ Str str_slice(Str str, U32 start, U32 len) Str str_concat(Allocator *alloc, Str first, Str second) { Str str; - + Assert(first.len <= U32_Max - second.len); str.len = first.len + second.len; str.str = allocator_push(alloc, str.len, 1);;