Skip to content

Commit 70041d1

Browse files
committed
fix package extract.
1 parent 34e402a commit 70041d1

File tree

1 file changed

+2
-2
lines changed
  • AvalonStudio/PackageManager/Compression/Lzma2

1 file changed

+2
-2
lines changed

AvalonStudio/PackageManager/Compression/Lzma2/Decoder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public sealed class Decoder : IDisposable
1616
private readonly DecoderSettings mSettings;
1717
private LZMA.Master.LZMA.CLzma2Dec mDecoder;
1818
private LZMA.Master.LZMA.ELzmaStatus mStatus;
19-
private int mDecoderPosition;
19+
private long mDecoderPosition;
2020
private bool mInputComplete;
2121
private bool mOutputComplete;
2222
private bool mDisposed;
@@ -119,7 +119,7 @@ public int ReadOutputData(byte[] buffer, int offset, int length)
119119

120120
length = Math.Min(length, AvailableOutputLength);
121121

122-
Buffer.BlockCopy(mDecoder.mDecoder.mDic.mBuffer, mDecoder.mDecoder.mDic.mOffset + mDecoderPosition, buffer, offset, length);
122+
Buffer.BlockCopy(mDecoder.mDecoder.mDic.mBuffer, mDecoder.mDecoder.mDic.mOffset + (int)mDecoderPosition, buffer, offset, length);
123123
mDecoderPosition += length;
124124
return length;
125125
}

0 commit comments

Comments
 (0)