mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2025-02-20 04:29:02 +00:00
restored a zero
This commit is contained in:
parent
4eaf2338cb
commit
32d1b5d07e
@ -171,7 +171,7 @@ public class SHRPictureFile2 extends HiResImage
|
|||||||
failureReason = "Buffer should be 38,400 bytes";
|
failureReason = "Buffer should be 38,400 bytes";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int maxTables = (buffer.length - 3200) / COLOR_TABLE_SIZE;
|
int maxTables = (buffer.length - 32000) / COLOR_TABLE_SIZE;
|
||||||
colorTables = new ColorTable[maxTables];
|
colorTables = new ColorTable[maxTables];
|
||||||
for (int i = 0; i < colorTables.length; i++)
|
for (int i = 0; i < colorTables.length; i++)
|
||||||
{
|
{
|
||||||
|
@ -387,7 +387,7 @@ public class HexFormatter
|
|||||||
{
|
{
|
||||||
if (ptr >= buffer.length)
|
if (ptr >= buffer.length)
|
||||||
{
|
{
|
||||||
System.out.println ("index out of range: " + ptr);
|
System.out.println ("Index out of range (unsigned short): " + ptr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return (buffer[ptr] & 0xFF) | ((buffer[ptr + 1] & 0xFF) << 8);
|
return (buffer[ptr] & 0xFF) | ((buffer[ptr + 1] & 0xFF) << 8);
|
||||||
@ -399,7 +399,7 @@ public class HexFormatter
|
|||||||
{
|
{
|
||||||
if (ptr >= buffer.length)
|
if (ptr >= buffer.length)
|
||||||
{
|
{
|
||||||
System.out.println ("index out of range: " + ptr);
|
System.out.println ("Index out of range (signed short): " + ptr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return (short) ((buffer[ptr] & 0xFF) | ((buffer[ptr + 1] & 0xFF) << 8));
|
return (short) ((buffer[ptr] & 0xFF) | ((buffer[ptr + 1] & 0xFF) << 8));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user