From ac3e0b308f6e26dc6769c238568ff41182522ce4 Mon Sep 17 00:00:00 2001 From: ture <51852312+turecross321@users.noreply.github.com> Date: Wed, 31 Jul 2024 10:14:34 +0200 Subject: [PATCH] Fix available length not counting the first null byte --- Refresher/Patching/EbootPatcher.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Refresher/Patching/EbootPatcher.cs b/Refresher/Patching/EbootPatcher.cs index 9adf691..01972c8 100644 --- a/Refresher/Patching/EbootPatcher.cs +++ b/Refresher/Patching/EbootPatcher.cs @@ -220,7 +220,10 @@ private static void FilterValidUrls(BinaryReader reader, List 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++;