Assert on overflow in str_concat

This commit is contained in:
2026-07-31 18:23:17 +02:00
parent 52cdc7d36b
commit 98f08084b5
+1 -1
View File
@@ -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);;