aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2019-07-03 15:27:01 +0200
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2019-07-03 15:27:01 +0200
commit6a2494fdffcb534ee74743e2857207543fa51563 (patch)
tree1f0d9251055d61846c729ab7939fb95403671444 /qtmips_gui
parent65f530cd6b38c9d1971314bb14705137623a8f9d (diff)
downloadqtmips-6a2494fdffcb534ee74743e2857207543fa51563.tar.gz
qtmips-6a2494fdffcb534ee74743e2857207543fa51563.tar.bz2
qtmips-6a2494fdffcb534ee74743e2857207543fa51563.zip
Allow underscore in labels.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_gui')
-rw-r--r--qtmips_gui/fixmatheval.cpp2
1 files changed, 1 insertions, 1 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);