X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.machine%2Fsrc%2Fnet%2Fmograsim%2Fmachine%2FMemory.java;fp=net.mograsim.machine%2Fsrc%2Fnet%2Fmograsim%2Fmachine%2FMemory.java;h=77c0d48bb44c048207aadc5ba4c8edd0566432ba;hb=259c5b8d38b6ed641fd9b5d78fe20969c67015dc;hp=58798c396fa1d519fed96591d849c0826175df59;hpb=2fe86b9ccd64afbe485b8290db9f11b93d9943bf;p=Mograsim.git diff --git a/net.mograsim.machine/src/net/mograsim/machine/Memory.java b/net.mograsim.machine/src/net/mograsim/machine/Memory.java index 58798c39..77c0d48b 100644 --- a/net.mograsim.machine/src/net/mograsim/machine/Memory.java +++ b/net.mograsim.machine/src/net/mograsim/machine/Memory.java @@ -19,7 +19,7 @@ public interface Memory public default long size() { MemoryDefinition def = getDefinition(); - return Long.max(0, def.getMaximalAddress() - def.getMinimalAddress()); + return Long.max(0, def.getMaximalAddress() - def.getMinimalAddress() + 1); } /**