Early exit.

This commit is contained in:
2017-07-24 04:51:08 +01:00
parent e2004a3ff8
commit dad9ea8584

View File

@@ -78,6 +78,10 @@ namespace DiscImageChef.PartPlugins
} }
X68kTable table = BigEndianMarshal.ByteArrayToStructureBigEndian<X68kTable>(sector); X68kTable table = BigEndianMarshal.ByteArrayToStructureBigEndian<X68kTable>(sector);
if(table.magic != X68kMagic)
return false;
for(int i = 0; i < table.entries.Length; i++) for(int i = 0; i < table.entries.Length; i++)
table.entries[i] = BigEndianMarshal.SwapStructureMembersEndian(table.entries[i]); table.entries[i] = BigEndianMarshal.SwapStructureMembersEndian(table.entries[i]);
@@ -86,9 +90,6 @@ namespace DiscImageChef.PartPlugins
DicConsole.DebugWriteLine("Human68k plugin", "table.size2 = {0:X4}", table.size2); DicConsole.DebugWriteLine("Human68k plugin", "table.size2 = {0:X4}", table.size2);
DicConsole.DebugWriteLine("Human68k plugin", "table.unknown = {0:X4}", table.unknown); DicConsole.DebugWriteLine("Human68k plugin", "table.unknown = {0:X4}", table.unknown);
if(table.magic != X68kMagic)
return false;
ulong counter = 0; ulong counter = 0;
foreach(X68kEntry entry in table.entries) foreach(X68kEntry entry in table.entries)