Skip to content

Commit

Permalink
Merge pull request #818 from marcin-krystianc/marcink-20200920-size0
Browse files Browse the repository at this point in the history
DeltaStreamReader should interpret instruction with size 0 as 0x10000
  • Loading branch information
AArnott committed Sep 20, 2022
2 parents 4a63c66 + 448dd8c commit a908c6d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/NerdBank.GitVersioning/ManagedGit/DeltaStreamReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ public static class DeltaStreamReader
{
value.Size |= ((byte)stream.ReadByte() << 16);
}

// Size zero is automatically converted to 0x10000.
if (value.Size == 0)
{
value.Size = 0x10000;
}
}

return value;
Expand Down

0 comments on commit a908c6d

Please sign in to comment.