Fixed a bug when the address size is not divisible by 8
authorDaniel Kirschten <daniel.kirschten@gmx.de>
Mon, 14 Oct 2019 21:23:10 +0000 (23:23 +0200)
committerDaniel Kirschten <daniel.kirschten@gmx.de>
Mon, 14 Oct 2019 21:23:10 +0000 (23:23 +0200)
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MainMemoryBlockExtension.java

index 2bec702..5d4cf5d 100644 (file)
@@ -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