projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'machines-are-launch-configs' into development
[Mograsim.git]
/
plugins
/
net.mograsim.plugin.core
/
src
/
net
/
mograsim
/
plugin
/
launch
/
MainMemoryBlockExtension.java
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
9355ae2
..
ff633fe
100644
(file)
--- 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
@@
-228,10
+228,11
@@
public class MainMemoryBlockExtension extends PlatformObject implements IMemoryB
{
BigInteger word = mem.getCellAsBigInteger(j.longValue());
byte[] wordBytes = word.toByteArray();
{
BigInteger word = mem.getCellAsBigInteger(j.longValue());
byte[] wordBytes = word.toByteArray();
+ int l = wordBytes[0] == 0 ? 1 : 0;
int k;
int k;
- for (k = 0; k < cellWidthBytes - wordBytes.length; k++)
+ for (k = 0; k < cellWidthBytes - wordBytes.length
+ l
; k++)
bytes[i + k] = new MemoryByte();
bytes[i + k] = new MemoryByte();
- for (
int l = 0; k < cellWidthBytes; k
++)
+ for (
; k < cellWidthBytes; k++, l
++)
bytes[i + k] = new MemoryByte(wordBytes[l]);
} else
for (int k = 0; k < cellWidthBytes; k++)
bytes[i + k] = new MemoryByte(wordBytes[l]);
} else
for (int k = 0; k < cellWidthBytes; k++)