diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-02-21 21:53:41 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-02-21 21:53:41 -0800 |
commit | fe67d47aa4598497e295510cf27f702a3e118632 (patch) | |
tree | da8d72108543168dc6c0ceee252fa82158639582 /cpp/018address | |
parent | 35e535712d43031d97a5da5fcbc38fb946c0b9dd (diff) | |
download | mu-fe67d47aa4598497e295510cf27f702a3e118632.tar.gz |
810
Diffstat (limited to 'cpp/018address')
-rw-r--r-- | cpp/018address | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/018address b/cpp/018address index bb173f94..32214761 100644 --- a/cpp/018address +++ b/cpp/018address @@ -20,7 +20,7 @@ vector<int> read_memory(reagent x) { } x = canonize(x); int base = to_int(x.name); - size_t size = size_of(x.types[0]); + size_t size = size_of(x); for (size_t offset = 0; offset < size; ++offset) { int val = Memory[base+offset]; trace("mem") << "location " << base+offset << " is " << val; @@ -43,7 +43,7 @@ recipe main [ void write_memory(reagent x, vector<int> data) { x = canonize(x); int base = to_int(x.name); - size_t size = size_of(x.types[0]); + size_t size = size_of(x); if (size != data.size()) raise << "size mismatch in storing to " << x.to_string(); for (size_t offset = 0; offset < size; ++offset) { trace("mem") << "storing in location " << base+offset; |