Fix syntax highlighter bug
Writing instructions on a line with labels would cause a crash
MODIFY
src/rwjumpwidget.ui
src/rwjumpwidget.ui
<item>
<widget class="QLabel" name="label">
<property name="text">
- <string>Most recent memory accesses</string>
+ <string>Memory accesses</string>
</property>
<property name="wordWrap">
<bool>true</bool>

MODIFY
src/syntaxhighlighter.cpp
src/syntaxhighlighter.cpp
@@ -535,6 +535,7 @@ QString SyntaxHighlighter::checkSyntax(const QString& input) {
return QString("Unknown instruction");
}
}
+ return QString();
}
// -- Validate remaining fields --
@@ -584,9 +585,10 @@ QString SyntaxHighlighter::checkSyntax(const QString& input) {
if (!resList.isEmpty())
return resList[0];
return QString("Unknown instruction");
+ } else {
+ return QString("Unknown instruction");
}
}
-
return QString();
}

Fix syntax highlighter bug

Writing instructions on a line with labels would cause a crash