diff options
| author | ame <[email protected]> | 2024-09-30 02:17:37 -0500 |
|---|---|---|
| committer | ame <[email protected]> | 2024-09-30 02:17:37 -0500 |
| commit | f648ac9db35f49f3dbd7373cc230f680c55cc04a (patch) | |
| tree | 2a9fafd40359419d36504b55e6041a9fdda23bc6 /src/types | |
| parent | 1cc24fda87c3e8df90a5ea2d526ce39adf4a7648 (diff) | |
| parent | fe33c0e979ebfc41c3eb9f561589f0d5d8810aaf (diff) | |
what
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;
}
|
