From 5a8ca99952a2e56c61a751bc4ee9ea1bc1987337 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Mon, 30 May 2022 23:03:53 +0700 Subject: Further bzip2 improvements --- crypto/bzip2/src/CBZip2InputStream.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crypto/bzip2/src/CBZip2InputStream.cs') diff --git a/crypto/bzip2/src/CBZip2InputStream.cs b/crypto/bzip2/src/CBZip2InputStream.cs index f1d31a0ab..111b1b530 100644 --- a/crypto/bzip2/src/CBZip2InputStream.cs +++ b/crypto/bzip2/src/CBZip2InputStream.cs @@ -334,7 +334,6 @@ namespace Org.BouncyCastle.Apache.Bzip2 int pp = 0, baseVal = 0; for (int i = minLen; i <= maxLen; i++) { - basev[i] = baseVal; for (int j = 0; j < alphaSize; j++) { if (length[j] == i) @@ -342,8 +341,9 @@ namespace Org.BouncyCastle.Apache.Bzip2 perm[pp++] = j; } } + basev[i] = baseVal; limit[i] = baseVal + pp; - baseVal += limit[i]; + baseVal += baseVal + pp; } } -- cgit 1.4.1