From 2c37c365d6d2c6b4f5fa8b5d25cff8fff2d11584 Mon Sep 17 00:00:00 2001 From: Denis Molony Date: Thu, 25 Jun 2020 14:50:29 +1000 Subject: [PATCH] tidying --- src/com/bytezone/diskbrowser/applefile/ExoBuffer.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/com/bytezone/diskbrowser/applefile/ExoBuffer.java b/src/com/bytezone/diskbrowser/applefile/ExoBuffer.java index fe9079e..ca12bc5 100644 --- a/src/com/bytezone/diskbrowser/applefile/ExoBuffer.java +++ b/src/com/bytezone/diskbrowser/applefile/ExoBuffer.java @@ -1,5 +1,6 @@ package com.bytezone.diskbrowser.applefile; +import com.bytezone.diskbrowser.utilities.HexFormatter; import com.bytezone.diskbrowser.utilities.Utility; // pack::: ~/exomizer-3.0.2/src/exomizer mem -q -P23 -lnone LODE148@0x4000 -o LODE148c @@ -68,12 +69,9 @@ public class ExoBuffer if (auxType != 0x1FF8 && auxType != 0x3FF8) return false; - int last = buffer.length - 1; - if (buffer[0] != 1 || buffer[1] != 0 || buffer[last - 1] != 0) - return false; + int address = HexFormatter.unsignedShort (buffer, buffer.length - 2); - if (buffer[last] != 0x60 && buffer[last] != (byte) 0x80 - && buffer[last] != (byte) 0xA0) + if (address != 0x6000 && address != 0x8000 && address != 0xA000) return false; return true; // maybe