Skip to content

Commit

Permalink
Cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
flanglet committed Feb 27, 2024
1 parent d577d80 commit 371626b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions v2/transform/Sequence.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ func (this *ByteTransformSequence) Forward(src, dst []byte) (uint, uint, error)
blockSize := uint(len(src))
length := blockSize
in, out := src, dst
var err error
swaps := 0

// Process transforms sequentially
for i, t := range this.transforms {
for i := range this.transforms {
var err error
savedLength := length

if len(out) < requiredSize {
Expand All @@ -89,7 +89,7 @@ func (this *ByteTransformSequence) Forward(src, dst []byte) (uint, uint, error)
}

// Apply forward transform
if _, length, err = t.Forward((in)[0:length], out); err != nil {
if _, length, err = this.transforms[i].Forward((in)[0:length], out); err != nil {
// Transform failed. Either it does not apply to this type
// of data or a recoverable error occurred => revert
length = savedLength
Expand Down

0 comments on commit 371626b

Please sign in to comment.