string: use memcpy instead of strncpy in nstrmul
This commit is contained in:
parent
8c591796fb
commit
2fbbfc61c0
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ string *nchrmul(nchar c, usize n, error *err)
|
||||||
|
|
||||||
char *pos = multiplied;
|
char *pos = multiplied;
|
||||||
while (n-- != 0) {
|
while (n-- != 0) {
|
||||||
strncpy(pos, &s[0], s_size);
|
memcpy(pos, &s[0], s_size);
|
||||||
pos += s_size;
|
pos += s_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue