Skip to content

Commit

Permalink
Fix regression
Browse files Browse the repository at this point in the history
  • Loading branch information
flanglet committed Jul 20, 2024
1 parent 704cde2 commit 516a223
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions v2/transform/ZRLT.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (this *ZRLT) Forward(src, dst []byte) (uint, uint, error) {
srcIdx, dstIdx := uint(0), uint(0)
res := true

for {
for srcIdx < srcEnd {
if src[srcIdx] == 0 {
runStart := srcIdx - 1
srcIdx++
Expand Down Expand Up @@ -117,10 +117,6 @@ func (this *ZRLT) Forward(src, dst []byte) (uint, uint, error) {

srcIdx++
dstIdx++

if srcIdx >= srcEnd || dstIdx >= dstEnd {
break
}
}

var err error
Expand Down Expand Up @@ -194,7 +190,7 @@ func (this *ZRLT) Inverse(src, dst []byte) (uint, uint, error) {
srcIdx++
dstIdx++

if srcIdx >= srcEnd {
if srcIdx >= srcEnd || dstIdx >= dstEnd {
break
}
}
Expand Down

0 comments on commit 516a223

Please sign in to comment.