diff --git a/modloader/Redirectors/Cpk/CpkRedirector.cs b/modloader/Redirectors/Cpk/CpkRedirector.cs index d03b5af..03da2ce 100644 --- a/modloader/Redirectors/Cpk/CpkRedirector.cs +++ b/modloader/Redirectors/Cpk/CpkRedirector.cs @@ -96,7 +96,7 @@ public override unsafe Native.NtStatus NtReadFileImpl( IntPtr handle, IntPtr hEv var cpk = mCpkByHandle[ handle ]; var effOffset = Utils.ResolveReadFileOffset( cpk.FilePointer, byteOffset ); Unsafe.CopyBlock( buffer, (byte*)cpk.Instance.Native.Ptr + effOffset, length ); - SetBytesRead( handle, (int)cpk.FilePointer, (int)length, ref ioStatus ); + SetBytesRead( handle, (int)effOffset, (int)length, ref ioStatus ); return NtStatus.Success; } diff --git a/modloader/Redirectors/DwPack/DwPackRedirector.cs b/modloader/Redirectors/DwPack/DwPackRedirector.cs index 0dfce6c..4175720 100644 --- a/modloader/Redirectors/DwPack/DwPackRedirector.cs +++ b/modloader/Redirectors/DwPack/DwPackRedirector.cs @@ -250,7 +250,7 @@ public override unsafe Native.NtStatus NtReadFileImpl( IntPtr handle, IntPtr hEv } Unsafe.CopyBlock( buffer, pack.Native.Ptr + effOffset, length ); - SetBytesRead( handle, ( int )offset, ( int )length, ref ioStatus ); + SetBytesRead( handle, ( int )effOffset, ( int )length, ref ioStatus ); result = NtStatus.Success; } else if ( effOffset >= dataOffset && effOffset < pack.VirtualFileSize ) diff --git a/modloader/Redirectors/Xact/XactRedirector.cs b/modloader/Redirectors/Xact/XactRedirector.cs index 4e80636..afbcbeb 100644 --- a/modloader/Redirectors/Xact/XactRedirector.cs +++ b/modloader/Redirectors/Xact/XactRedirector.cs @@ -334,7 +334,7 @@ public override unsafe Native.NtStatus NtReadFileImpl( IntPtr handle, IntPtr hEv { // Header read Unsafe.CopyBlock( buffer, waveBank.Native.Ptr + effOffset, length ); - SetBytesRead( handle, (int)waveBank.FilePointer, (int)length, ref ioStatus ); + SetBytesRead( handle, (int)effOffset, (int)length, ref ioStatus ); result = NtStatus.Success; } else if ( effOffset >= waveDataOffset && effOffset < waveBank.VirtualFileSize )