Open Retera opened 3 months ago
diff --git a/src/app/highlightinfo.cpp b/src/app/highlightinfo.cpp
index 80ad39c..c630b88 100644
--- a/src/app/highlightinfo.cpp
+++ b/src/app/highlightinfo.cpp
@@ -148,10 +148,10 @@ HighLightInfo::HighLightInfo(const QString &text, const QList<VJassToken> &token
const int lineDiff = e1.getLine() - e2.getLine();
if (lineDiff == 0) {
- return e1.getColumn() - e2.getColumn();
+ return e1.getColumn() < e2.getColumn();
}
- return lineDiff;
+ return lineDiff < 0;
});
if (analyzeMemoryLeaks) {
It seems that with the above change, I was able to hack-away my Segmentation Fault. It was the result of some guesswork based on the stack trace. Perhaps my system requires comparison functions to return a boolean value instead of the result of a subtraction.
I tried compiling this program and then using it to open a file on my GNU computer. But after I opened my custom
.j
file, I received a Segmentation Fault. I tried to get a stacktrace and it looked like this: