mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
examples: fix path_tracing.v compilation, using (*ptr) = expression
This commit is contained in:
@@ -74,7 +74,7 @@ pub fn (x &AesCbc) encrypt_blocks(dst mut []byte, src_ []byte) {
|
||||
} else {
|
||||
src = src[x.block_size..]
|
||||
}
|
||||
*dst = dst[x.block_size..]
|
||||
(*dst) = dst[x.block_size..]
|
||||
}
|
||||
|
||||
// Save the iv for the next crypt_blocks call.
|
||||
|
||||
@@ -63,13 +63,11 @@ pub fn (c mut Cipher) xor_key_stream(dst mut []byte, src []byte) {
|
||||
if src.len == 0 {
|
||||
return
|
||||
}
|
||||
if subtle.inexact_overlap(dst[..src.len], src) {
|
||||
if subtle.inexact_overlap(dst, src) {
|
||||
panic('crypto.rc4: invalid buffer overlap')
|
||||
}
|
||||
mut i := c.i
|
||||
mut j := c.j
|
||||
_ = dst[src.len-1]
|
||||
*dst = dst[..src.len] // eliminate bounds check from loop
|
||||
for k, v in src {
|
||||
i += byte(1)
|
||||
x := c.s[i]
|
||||
|
||||
Reference in New Issue
Block a user