diff options
Diffstat (limited to 'src/types')
| -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;
}
|
