commit b7df4bed52b18761b7c3161ac7e7fdf5f59b9a92
parent bc1bc3e89b422bbc83b2e7683e568ea339df4866
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Wed, 1 May 2024 15:39:02 +0200
gracefully exit UC constructor if rom is not valid
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/source/xtLib/xtUc.cpp b/source/xtLib/xtUc.cpp
@@ -14,7 +14,8 @@ namespace xt
: m_flash(m_romRuntimeData.data(), m_romRuntimeData.size(), false, true)
, m_pic(*this, m_lcd)
{
- assert(_rom.isValid() && _rom.getSize() == m_romRuntimeData.size());
+ if(!_rom.isValid())
+ return;
memcpy(m_romRuntimeData.data(), _rom.getData(), g_romSize);
m_memory.fill(0);