mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vlib: add mut for the first parameter of builtin.copy, arrays.copy and crypto (#13702)
This commit is contained in:
@@ -151,13 +151,13 @@ fn (mut h Hashed) hash_byte() []byte {
|
||||
}
|
||||
arr[n] = `$`
|
||||
n++
|
||||
copy(arr[n..], '${int(h.cost):02}'.bytes())
|
||||
copy(mut arr[n..], '${int(h.cost):02}'.bytes())
|
||||
n += 2
|
||||
arr[n] = `$`
|
||||
n++
|
||||
copy(arr[n..], h.salt)
|
||||
copy(mut arr[n..], h.salt)
|
||||
n += bcrypt.encoded_salt_size
|
||||
copy(arr[n..], h.hash)
|
||||
copy(mut arr[n..], h.hash)
|
||||
n += bcrypt.encoded_hash_size
|
||||
res := arr[..n].clone()
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user