Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/BepInEx/BepInEx into reactor
Browse files Browse the repository at this point in the history
  • Loading branch information
js6pak committed Jan 14, 2021
2 parents d3d0287 + 03b0427 commit 81d70dd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions BepInEx.Core/Contract/Attributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,16 @@ void ICacheable.Save(BinaryWriter bw)
{
bw.Write(DependencyGUID);
bw.Write((int)Flags);
bw.Write(VersionRange.ToString());
bw.Write(VersionRange?.ToString() ?? string.Empty);
}

void ICacheable.Load(BinaryReader br)
{
DependencyGUID = br.ReadString();
Flags = (DependencyFlags)br.ReadInt32();
VersionRange = SemVer.Range.Parse(br.ReadString());

var versionRange = br.ReadString();
VersionRange = versionRange == string.Empty ? null : SemVer.Range.Parse(versionRange);
}
}

Expand Down

0 comments on commit 81d70dd

Please sign in to comment.