Skip to content

Commit

Permalink
encoding.base32: fix warning of implicit clone of array, by using an …
Browse files Browse the repository at this point in the history
…explicit unsafe block (vlang#21728)
  • Loading branch information
mike-ward authored and raw-bin committed Jul 2, 2024
1 parent c108786 commit 7c3a8b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vlib/encoding/base32/base32.v
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@ fn (enc &Encoding) decode_(src_ []u8, mut dst []u8) !(int, bool) {
break
}
in0 := src[0]
src = src[1..]
unsafe {
src = src[1..]
}
if in0 == enc.padding_char && j >= 2 && src.len < 8 {
// We`ve reached the end and there`s padding
if src.len + j < 8 - 1 {
Expand Down

0 comments on commit 7c3a8b9

Please sign in to comment.