string: use memcpy instead of strncpy in nstrmul

This commit is contained in:
anna 2021-07-15 23:10:57 +02:00
parent 8c591796fb
commit 2fbbfc61c0
Signed by: fef
GPG key ID: EC22E476DC2D3D84

View file

@ -57,7 +57,7 @@ string *nchrmul(nchar c, usize n, error *err)
char *pos = multiplied;
while (n-- != 0) {
strncpy(pos, &s[0], s_size);
memcpy(pos, &s[0], s_size);
pos += s_size;
}