aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/programmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_gui/programmodel.cpp')
-rw-r--r--qtmips_gui/programmodel.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/qtmips_gui/programmodel.cpp b/qtmips_gui/programmodel.cpp
index 64dffb8..0f3341f 100644
--- a/qtmips_gui/programmodel.cpp
+++ b/qtmips_gui/programmodel.cpp
@@ -274,8 +274,7 @@ bool ProgramModel::setData(const QModelIndex & index, const QVariant & value, in
mem->write_word(address, data);
break;
case 3:
- data = machine::Instruction::from_string(value.toString(), &ok, address).data();
- if (!ok)
+ if (machine::Instruction::code_from_string(&data, 4, value.toString(), address) < 0)
return false;
mem->write_word(address, data);
break;