Correct compilation warnings.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2018-09-15 18:33:33 +01:00
parent 7d840f1a42
commit 6256d0bf8d
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ inline void EightBit::assume(int expression) {
# define PARITY(x) EightBit::oddParity(x)
# define UNREACHABLE ASSUME(0)
# define UNREACHABLE { ASSUME(0); throw new std::exception("unreachable"); }
#elif defined(__GNUG__)

View File

@ -32,7 +32,7 @@ void EightBit::Bus::loadHexFile(const std::string path) {
const auto address = chunk.first;
const auto content = chunk.second;
for (size_t i = 0; i != content.size(); ++i)
write(address + i, content[i]);
write((uint16_t)(address + i), content[i]);
const auto mapped = mapping(address);
mapped.memory.load(content, address - mapped.begin);
}