Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ICSharpCode.SharpZipLib/Zip/ZipEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ public int HostSystem

set
{
versionMadeBy &= 0xff;
versionMadeBy &= 0x00ff;
versionMadeBy |= (ushort)((value & 0xff) << 8);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/ICSharpCode.SharpZipLib/Zip/ZipFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ public ZipFile(string name)
public ZipFile(FileStream file) :
this(file, false)
{

}

/// <summary>
Expand Down Expand Up @@ -489,7 +489,7 @@ public ZipFile(FileStream file, bool leaveOpen)
public ZipFile(Stream stream) :
this(stream, false)
{

}

/// <summary>
Expand Down Expand Up @@ -2157,7 +2157,7 @@ private int WriteCentralDirectoryHeader(ZipEntry entry)
WriteLEInt(ZipConstants.CentralHeaderSignature);

// Version made by
WriteLEShort(ZipConstants.VersionMadeBy);
WriteLEShort((entry.HostSystem << 8) | entry.VersionMadeBy);

// Version required to extract
WriteLEShort(entry.Version);
Expand Down
2 changes: 1 addition & 1 deletion src/ICSharpCode.SharpZipLib/Zip/ZipOutputStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ public override void Finish()
foreach (ZipEntry entry in entries)
{
WriteLeInt(ZipConstants.CentralHeaderSignature);
WriteLeShort(ZipConstants.VersionMadeBy);
WriteLeShort((entry.HostSystem << 8) | entry.VersionMadeBy);
WriteLeShort(entry.Version);
WriteLeShort(entry.Flags);
WriteLeShort((short)entry.CompressionMethodForHeader);
Expand Down