From b4e62ef6cca1c2b894c1288825966df2b0a32aa8 Mon Sep 17 00:00:00 2001 From: cracyc Date: Thu, 23 Jun 2016 09:57:43 -0500 Subject: [PATCH] cheat: step one item at a time and write valid xml (nw) --- src/frontend/mame/cheat.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontend/mame/cheat.cpp b/src/frontend/mame/cheat.cpp index 3116be74b32..3f23904c2da 100644 --- a/src/frontend/mame/cheat.cpp +++ b/src/frontend/mame/cheat.cpp @@ -219,6 +219,7 @@ void cheat_parameter::save(emu_file &cheatfile) const // iterate over items else { + cheatfile.printf(">\n"); for (auto &curitem : m_itemlist) cheatfile.printf("\t\t\t%s\n", curitem->value().format().c_str(), curitem->text()); cheatfile.printf("\t\t\n"); @@ -300,7 +301,7 @@ bool cheat_parameter::set_next_state() if (it->get()->value() == m_value) break; if (it != m_itemlist.end() && (++it != m_itemlist.end())) - m_value = (++it)->get()->value(); + m_value = it->get()->value(); } return (m_value != origvalue);