vlib: add mut for the first parameter of builtin.copy, arrays.copy and crypto (#13702)

This commit is contained in:
Nick Treleaven 2022-03-09 18:26:00 +00:00 committed by GitHub
parent 4c33003f86
commit 7231a3f135
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 84 additions and 88 deletions

View file

@ -19,7 +19,7 @@ fn (mut s StringReader) read(mut buf []byte) ?int {
}
mut howmany := imin(buf.len, s.text.len - s.place)
xxx := s.text[s.place..s.place + howmany].bytes()
read := copy(buf, xxx)
read := copy(mut buf, xxx)
s.place += read
return read
}