diff options
author | Vas Crabb <vas@vastheman.com> | 2018-04-03 04:31:22 +1000 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2018-04-03 04:31:22 +1000 |
commit | bd915d27e68fd67074e5a295cda8c0df5efd216f (patch) | |
tree | 56d877c9adf33b7cf055025c69170db5159837f6 | |
parent | e5a2ac53869fc74f6a5bfbd060314a1ced0f3064 (diff) |
hopefully the last emucore reference in unidasm (nw)
-rw-r--r-- | src/devices/cpu/upd7810/upd7810_dasm.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/devices/cpu/upd7810/upd7810_dasm.cpp b/src/devices/cpu/upd7810/upd7810_dasm.cpp index 0542b3be8aa..6f07126a029 100644 --- a/src/devices/cpu/upd7810/upd7810_dasm.cpp +++ b/src/devices/cpu/upd7810/upd7810_dasm.cpp @@ -11,6 +11,9 @@ #include "emu.h" #include "upd7810_dasm.h" +#include <stdexcept> + + const char *upd7810_base_disassembler::dasm_s::name() const { return token_names[m_token]; @@ -38,7 +41,10 @@ bool upd7810_base_disassembler::dasm_s::is_return() const const upd7810_base_disassembler::dasm_s &upd7810_base_disassembler::dasm_s::prefix_get(uint8_t op) const { - assert(m_token == prefix); +#ifndef NDEBUG + if (m_token != prefix) + throw std::logic_error("cannot get prefix with current token"); +#endif return reinterpret_cast<const dasm_s *>(m_args)[op]; } |