From fe33c0e979ebfc41c3eb9f561589f0d5d8810aaf Mon Sep 17 00:00:00 2001 From: amelia squires Date: Sun, 29 Sep 2024 02:49:05 -0500 Subject: docs n stuff --- src/types/str.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/types') diff --git a/src/types/str.c b/src/types/str.c index 0378285..4b257cb 100644 --- a/src/types/str.c +++ b/src/types/str.c @@ -12,7 +12,7 @@ str* str_initl(const char* init, size_t len){ if(s->c == NULL) p_fatal("failed to allocate string\n"); s->len = len ; - memcpy(s->c, init, len + 1); + memcpy(s->c, init, (len + 1) * sizeof * init); return s; } -- cgit v1.2.3