diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/crsm.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crsm.cpp b/src/crsm.cpp index 40d328e..be06197 100644 --- a/src/crsm.cpp +++ b/src/crsm.cpp @@ -847,7 +847,7 @@ QString CRSM::scenPath(QString scenName) QString name = scenName.mid(split.first().length() + 1); if(split.length() >= 2) { - if(split.first().right(4) == ".c4f") + if(split.first().endsWith(".c4f")) { const QStringList& entryList = QDir(Config.Auto.Volatile.Clonk.Directory).entryList(QStringList() << "*.c4f"); QString folderName = split.first(); @@ -1861,7 +1861,7 @@ QString CRSM::getCommand(const QString &message) { foreach(const QString& commandSign, Config.CRSM.CommandSigns) { - if(message.length() > commandSign.length() && message.leftRef(commandSign.length()) == commandSign) + if(message.startsWith(commandSign)) { return message.mid(commandSign.length()); } @@ -1886,7 +1886,7 @@ void CRSM::removeCommandSuffixes(QString& command) { foreach(const QString& suffix, Config.CRSM.CommandSuffixes) { - if(command.length() > suffix.length() && command.right(suffix.length()) == suffix) + if(command.endsWith(suffix)) { command.chop(suffix.length()); break; |
