rebuild file struct again

This commit is contained in:
Nitload
2024-05-29 11:24:10 +08:00
parent 5033a6d50b
commit c0093f7b5c
7 changed files with 10 additions and 135 deletions
+4 -4
View File
@@ -219,13 +219,13 @@ namespace StgSharp.Data.FileIO
{
get
{
byte[] bytes = new byte[15 * 16];
byte[] bytes = new byte[(StgSharp.ssdSegmentLength - 1)* 16];
fixed (byte* bptr = segmentData.Data)
{
Marshal.Copy(
source: (IntPtr)bptr,
destination: bytes,
256, 15 * 16);
(StgSharp.ssdSegmentLength) * 16, (StgSharp.ssdSegmentLength - 1) * 16);
}
return Encoding.UTF8.GetString(bytes);
}
@@ -237,8 +237,8 @@ namespace StgSharp.Data.FileIO
Marshal.Copy(
source: namecode,
startIndex: 0,
destination: (IntPtr)(bptr + 256),
length: 15 * 16);
destination: (IntPtr)(bptr + (StgSharp.ssdSegmentLength) * 16),
length: (StgSharp.ssdSegmentLength - 1) * 16);
}
}
}