aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qtmips_gui/fixmatheval.cpp2
-rw-r--r--qtmips_machine/instruction.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/qtmips_gui/fixmatheval.cpp b/qtmips_gui/fixmatheval.cpp
index c06d892..8852938 100644
--- a/qtmips_gui/fixmatheval.cpp
+++ b/qtmips_gui/fixmatheval.cpp
@@ -199,7 +199,7 @@ bool FmeExpression::parse(const QString &expression, QString &error) {
QChar ch = 0;
if (i < expression.size())
ch = expression.at(i);
- if(!ch.isLetterOrNumber()|| (i >= expression.size())) {
+ if(!(ch.isLetterOrNumber() || (ch == '_')) || (i >= expression.size())) {
if (in_word) {
FmeNode *new_node = nullptr;
QString word = expression.mid(word_start, i - word_start);
diff --git a/qtmips_machine/instruction.cpp b/qtmips_machine/instruction.cpp
index 3713cdb..cfa0f1a 100644
--- a/qtmips_machine/instruction.cpp
+++ b/qtmips_machine/instruction.cpp
@@ -1114,7 +1114,7 @@ static void reloc_append(RelocExpressionList *reloc, QString fl, uint32_t inst_a
QChar ch = fl.at(i);
if (ch.isSpace())
continue;
- if (ch.isLetterOrNumber())
+ if (ch.isLetterOrNumber() || (ch == '_'))
expression.append(ch);
else if (allowed_operators.indexOf(ch) >= 0)
expression.append(ch);