Skip to content

Commit

Permalink
Fix available length not counting the first null byte
Browse files Browse the repository at this point in the history
  • Loading branch information
turecross321 committed Jul 31, 2024
1 parent 08102da commit ac3e0b3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Refresher/Patching/EbootPatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@ private static void FilterValidUrls(BinaryReader reader, List<long> foundPossibl
}

if (tooLong) continue;


//Seek back to first null byte
reader.BaseStream.Position = foundPosition + len;

//Keep reading until we arent at a null byte
while (reader.ReadByte() == 0) len++;

Expand Down

0 comments on commit ac3e0b3

Please sign in to comment.