Fix condition in rar v3 code

This commit is contained in:
Morilli
2025-02-11 03:04:18 +01:00
parent 55797e5873
commit 94789ce455

View File

@@ -263,7 +263,7 @@ internal sealed partial class Unpack : BitInput, IRarUnpack, IDisposable
if (((wrPtr - unpPtr) & PackDef.MAXWINMASK) < 260 && wrPtr != unpPtr)
{
UnpWriteBuf();
if (destUnpSize <= 0)
if (destUnpSize < 0)
{
return;
}
@@ -713,7 +713,7 @@ internal sealed partial class Unpack : BitInput, IRarUnpack, IDisposable
private void UnpWriteData(byte[] data, int offset, int size)
{
if (destUnpSize <= 0)
if (destUnpSize < 0)
{
return;
}