Skip to content

Commit

Permalink
Hotfix because of course i'm rretarded
Browse files Browse the repository at this point in the history
  • Loading branch information
SirJosh3917 committed Jun 12, 2018
1 parent a787c0c commit a3252b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions StringDB/StringDB.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
<Description>StringDB is a fast, powerful, lightweight archival-style DB that uses mainly (you guessed it!) strings.</Description>
<PackageProjectUrl>https://www.github.com/SirJosh3917/StringDB</PackageProjectUrl>
<RepositoryUrl>https://www.github.com/SirJosh3917/StringDB</RepositoryUrl>
<Version>3.1.0</Version>
<AssemblyVersion>3.1.0.0</AssemblyVersion>
<Version>3.0.1</Version>
<AssemblyVersion>3.0.1.0</AssemblyVersion>
<FileVersion>3.0.1.0</FileVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
4 changes: 4 additions & 0 deletions StringDB/Writer/StreamWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public StreamWriter(Stream s, DatabaseVersion dbv = DatabaseVersion.Latest, bool
public void Load(ulong indexChainWrite, ulong indexChain) {
this._indexChain = indexChain;
this._indexChainWrite = indexChainWrite;

this._stream.Seek((long)this._indexChain, SeekOrigin.Begin);
}

private void InsertString(string index, string data) {
Expand Down Expand Up @@ -153,6 +155,8 @@ private void InsertRangeGrunt(ICollection<KeyValuePair<string, object>> data) {
if (data == null) throw new ArgumentNullException(nameof(data));
if (data.Count == 0) throw new ArgumentException("Collection is empty", nameof(data));

this._stream.Seek(0, SeekOrigin.End);

this._indexChain = (ulong)this._stream.Position;

if (this._indexChainWrite != 0) {
Expand Down

0 comments on commit a3252b3

Please sign in to comment.