From: Daniel Kirschten Date: Mon, 14 Oct 2019 21:23:10 +0000 (+0200) Subject: Fixed a bug when the address size is not divisible by 8 X-Git-Url: https://mograsim.net/gitweb/?a=commitdiff_plain;h=14537617db2bdf3f41c82d724871d9f9c0f8e40e;p=Mograsim.git Fixed a bug when the address size is not divisible by 8 --- diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MainMemoryBlockExtension.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MainMemoryBlockExtension.java index 2bec7023..5d4cf5de 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MainMemoryBlockExtension.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MainMemoryBlockExtension.java @@ -195,7 +195,7 @@ public class MainMemoryBlockExtension extends PlatformObject implements IMemoryB @Override public int getAddressSize() throws DebugException { - return getBigLength().bitLength() / 8; + return (getBigLength().bitLength() + 7) / 8; } @Override