Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
Fix GGPKRecord Version saving
Browse files Browse the repository at this point in the history
  • Loading branch information
aianlinb authored Oct 3, 2020
1 parent 6bef689 commit 94525ed
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions LibGGPK/Records/GGPKRecord.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace LibGGPK.Records
Expand All @@ -19,7 +17,7 @@ public sealed class GgpkRecord : BaseRecord
/// </summary>
public long[] RecordOffsets;

public uint Version;
public uint Version = 3;

public GgpkRecord(uint length)
{
Expand Down Expand Up @@ -60,7 +58,7 @@ public override void Write(BinaryWriter bw, Dictionary<long, long> changedOffset
{
bw.Write(Length); // 28
bw.Write(Encoding.ASCII.GetBytes(Tag)); // GGPK
bw.Write(Version); // 2
bw.Write(Version);

var offset = RecordOffsets[0];
bw.Write(changedOffsets.ContainsKey(offset) ? changedOffsets[offset] : offset);
Expand Down

0 comments on commit 94525ed

Please sign in to comment.