diff options
| author | amelia squires <[email protected]> | 2024-09-29 02:49:05 -0500 |
|---|---|---|
| committer | amelia squires <[email protected]> | 2024-09-29 02:49:05 -0500 |
| commit | fe33c0e979ebfc41c3eb9f561589f0d5d8810aaf (patch) | |
| tree | 526d2f71581e2584c9de2b958fd89b6ce0fb0ac1 /src/types/str.c | |
| parent | 602818b895fec710b0534b0b8fa7f5e1f57203c2 (diff) | |
docs n stuff
Diffstat (limited to 'src/types/str.c')
| -rw-r--r-- | src/types/str.c | 2 |
1 files changed, 1 insertions, 1 deletions
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;
}
|
