mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-09 17:52:50 +00:00
.
This commit is contained in:
parent
43f26fe1d1
commit
387ee6374b
2 changed files with 13 additions and 12 deletions
|
|
@ -382,7 +382,8 @@ namespace Kudzu.BreakpointsKernel
|
||||||
var xData = new byte[xRootFile.Size];
|
var xData = new byte[xRootFile.Size];
|
||||||
var size = (int) xRootFile.Size;
|
var size = (int) xRootFile.Size;
|
||||||
Console.WriteLine("Size: " + size);
|
Console.WriteLine("Size: " + size);
|
||||||
xStream.Read(xData, 0, (int) xRootFile.Size);
|
var sizeInt = (int)xRootFile.Size;
|
||||||
|
xStream.Read(xData, 0, sizeInt);
|
||||||
var xText = Encoding.ASCII.GetString(xData);
|
var xText = Encoding.ASCII.GetString(xData);
|
||||||
Console.WriteLine(xText);
|
Console.WriteLine(xText);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -96,18 +96,18 @@ namespace Cosmos.System.Filesystem.FAT {
|
||||||
UInt64 xClusterIdx = mPosition / xClusterSize;
|
UInt64 xClusterIdx = mPosition / xClusterSize;
|
||||||
UInt64 xPosInCluster = mPosition % xClusterSize;
|
UInt64 xPosInCluster = mPosition % xClusterSize;
|
||||||
mFS.ReadCluster((ulong)mFatTable[(int)xClusterIdx], xCluster);
|
mFS.ReadCluster((ulong)mFatTable[(int)xClusterIdx], xCluster);
|
||||||
// long xReadSize;
|
long xReadSize;
|
||||||
// if (xPosInCluster + xCount > xClusterSize) {
|
if (xPosInCluster + xCount > xClusterSize) {
|
||||||
// xReadSize = (long)(xClusterSize - xPosInCluster - 1);
|
xReadSize = (long)(xClusterSize - xPosInCluster - 1);
|
||||||
// } else {
|
} else {
|
||||||
// xReadSize = (long)xCount;
|
xReadSize = (long)xCount;
|
||||||
// }
|
}
|
||||||
// // no need for a long version, because internal Array.Copy() does a cast down to int, and a range check,
|
// no need for a long version, because internal Array.Copy() does a cast down to int, and a range check,
|
||||||
// // or we do a semantic change here
|
// or we do a semantic change here
|
||||||
// Array.Copy(xCluster, (long)xPosInCluster, aBuffer, aOffset, xReadSize);
|
Array.Copy(xCluster, (long)xPosInCluster, aBuffer, aOffset, xReadSize);
|
||||||
|
|
||||||
// aOffset += xReadSize;
|
aOffset += xReadSize;
|
||||||
//xCount -= (ulong)xReadSize;
|
xCount -= (ulong)xReadSize;
|
||||||
xCount = 0;
|
xCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue