aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sv.c b/lib/sv.c
index b2425b8..a83f303 100644
--- a/lib/sv.c
+++ b/lib/sv.c
@@ -60,7 +60,8 @@ sv_t sv_chop(sv_t sv, u64 size)
sv_t sv_concat(arena_t *allocator, sv_t a, sv_t b)
{
- sv_t c = sv_make(allocator, a.data, a.size + b.size);
+ sv_t c = sv_make(allocator, NULL, a.size + b.size);
+ memcpy(c.data, a.data, a.size);
memcpy(c.data + a.size, b.data, b.size);
return c;
}