mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-11-28 20:50:13 +00:00
allow truncated bin2 files
This commit is contained in:
parent
82381a6a47
commit
b98ecbed8d
@ -43,10 +43,14 @@ public class Binary2
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
binary2Header = new Binary2Header (buffer, ptr);
|
binary2Header = new Binary2Header (buffer, ptr);
|
||||||
headers.add (binary2Header);
|
|
||||||
|
|
||||||
totalBlocks += binary2Header.totalBlocks;
|
totalBlocks += binary2Header.totalBlocks;
|
||||||
ptr += ((binary2Header.eof - 1) / 128 + 2) * 128;
|
ptr += ((binary2Header.eof - 1) / 128 + 2) * 128;
|
||||||
|
|
||||||
|
if (ptr > buffer.length) // not enough blocks for this file
|
||||||
|
break;
|
||||||
|
|
||||||
|
headers.add (binary2Header);
|
||||||
} while (binary2Header.filesToFollow > 0);
|
} while (binary2Header.filesToFollow > 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user