mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
regtools/qeditor: fix backend dump bug, be more correct on read
Change-Id: I581c033435f553f092b61144c4b68b05ab931dd8 Reviewed-on: http://gerrit.rockbox.org/1019 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
This commit is contained in:
parent
6cb861137d
commit
04e798eddf
2 changed files with 5 additions and 4 deletions
|
@ -116,9 +116,10 @@ RamIoBackend::RamIoBackend(const QString& soc_name)
|
|||
|
||||
bool RamIoBackend::ReadRegister(const QString& name, soc_word_t& value)
|
||||
{
|
||||
if(m_map.find(name) == m_map.end())
|
||||
QMap<QString, soc_word_t>::const_iterator it = m_map.find(name);
|
||||
if(it == m_map.end())
|
||||
return false;
|
||||
value = m_map[name];
|
||||
value = it.value();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -617,7 +618,7 @@ bool BackendHelper::DumpAllRegisters(IoBackend *backend, bool ignore_errors)
|
|||
if(!ignore_errors)
|
||||
return false;
|
||||
}
|
||||
if(!bh.WriteRegister(devname, regname, val))
|
||||
else if(!bh.WriteRegister(devname, regname, val))
|
||||
{
|
||||
ret = false;
|
||||
if(!ignore_errors)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue