Skip to content

Commit

Permalink
Set position to 0 before importing from stream
Browse files Browse the repository at this point in the history
  • Loading branch information
Neodymium146 committed Jun 17, 2017
1 parent 059e191 commit cd90cac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions RageLib.GTA5/ArchiveWrappers/RageArchiveWrapper7.cs
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@ public void Import(Stream stream)
binaryStream.SetLength(stream.Length);

byte[] buf = new byte[stream.Length];
stream.Position = 0;
stream.Read(buf, 0, buf.Length);
binaryStream.Write(buf, 0, buf.Length);
}
Expand Down Expand Up @@ -787,6 +788,7 @@ public void Import(Stream stream)

// read resource
var reader = new DataReader(stream);
reader.Position = 0;
var ident = reader.ReadUInt32();
var version = reader.ReadUInt32();
var systemFlags = reader.ReadUInt32();
Expand Down

0 comments on commit cd90cac

Please sign in to comment.