Create Device.size()
This commit is contained in:
1 parent
1c9c742477
commit
d8deca227f
2 files changed
+9
-1
No files matched your search
@@ -42,7 +42,7 @@ public class Memory extends Device {
|
||||
throws MemoryRangeException {
|
||||
super(startAddress, endAddress, (readOnly ? "RO Memory" : "RW Memory"));
|
||||
this.readOnly = readOnly;
|
||||
this.mem = new int[endAddress - startAddress + 1];
|
||||
this.mem = new int[this.size];
|
||||
this.fill(DEFAULT_FILL);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user