Skip to content

Commit c13df79

Browse files
Fix extraction of recent MPF-zipped logs (#38)
* Fix extraction of recent MPF-zipped logs * Use greater than or equal to * corrected logic
1 parent 48bcc1d commit c13df79

File tree

1 file changed

+2
-1
lines changed
  • SabreTools.Serialization/Readers

1 file changed

+2
-1
lines changed

SabreTools.Serialization/Readers/PKZIP.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,8 @@ public class PKZIP : BaseBinaryReader<Archive>
770770

771771
obj.HeaderID = (HeaderID)data.ReadUInt16LittleEndian(ref offset);
772772
obj.DataSize = data.ReadUInt16LittleEndian(ref offset);
773-
obj.Data = data.ReadBytes(ref offset, obj.DataSize);
773+
if (obj.DataSize > 0)
774+
obj.Data = data.ReadBytes(ref offset, obj.DataSize);
774775

775776
return obj;
776777
}

0 commit comments

Comments
 (0)