mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-11-29 11:49:29 +00:00
fix self-referencing sector
This commit is contained in:
parent
b1c9e1aadc
commit
c9eb6f0036
@ -27,7 +27,7 @@ class CatalogEntry extends AbstractCatalogEntry
|
||||
{
|
||||
System.out.printf ("Attempt to assign TS sector to occupied sector "
|
||||
+ ": %s from %s%n", da, name);
|
||||
break;
|
||||
// break;
|
||||
}
|
||||
tsSectors.add (da);
|
||||
byte[] sectorBuffer = disk.readSector (da);
|
||||
@ -42,6 +42,7 @@ class CatalogEntry extends AbstractCatalogEntry
|
||||
break;
|
||||
}
|
||||
|
||||
DiskAddress thisDA = da;
|
||||
for (int i = startPtr, max = disk.getBlockSize (); i < max; i += 2)
|
||||
{
|
||||
da = getValidAddress (sectorBuffer, i);
|
||||
@ -76,11 +77,17 @@ class CatalogEntry extends AbstractCatalogEntry
|
||||
da = getValidAddress (sectorBuffer, 1);
|
||||
if (da == null)
|
||||
{
|
||||
System.out.print ("Next T/S list in sector " + da);
|
||||
System.out.print ("Next T/S list in sector " + thisDA);
|
||||
System.out.printf (" is invalid : %02X, %02X%n", sectorBuffer[1],
|
||||
sectorBuffer[2]);
|
||||
break;
|
||||
}
|
||||
|
||||
if (thisDA.compareTo (da) == 0)
|
||||
{
|
||||
System.out.printf ("Next T/S list in sector %s points to itself%n", thisDA);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user