aboutsummaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorMartin Lehoux <martin@lehoux.net>2025-02-14 16:39:54 +0000
committerGitHub <noreply@github.com>2025-02-14 16:39:54 +0000
commit03632f51152e5e3b6bb74c29987709fbe97a9a69 (patch)
treedf6a4cbb37f084f64066e4caba0367ad4181984b /string.c
parent8a9e6b1bd3be1041792311a86d8aac68b659e891 (diff)
parentd3d71bb044e0ae9af75bd74d4030e1d95f18a68e (diff)
Merge pull request #1 from martinlehoux/json-nested-parsing
json nested parsing
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 509163f..b07ba02 100644
--- a/string.c
+++ b/string.c
@@ -25,7 +25,7 @@ uint64_t Str_hash64(Str s) {
}
Str Str_copy(Arena *a, char *data, uintptr_t len) {
- Str str = {0};
+ Str str = {0, len};
str.data = new (a, char, len);
if (str.len)
memcpy(str.data, data, len);