aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2020-03-31 19:46:23 +0200
committerRenaud G <renaud@rolisteam.org>2020-03-31 19:46:23 +0200
commit14b2b264097cebb05237164f7320ad4b4fbbfba0 (patch)
tree85231c7bcfb924adb352cb1fe41550cd3bb1735f
parent72eb6974dbbca3dd2b490d78f57683157bb4e6cf (diff)
downloadOneRoll-14b2b264097cebb05237164f7320ad4b4fbbfba0.tar.gz
OneRoll-14b2b264097cebb05237164f7320ad4b4fbbfba0.zip
Don't display string result if it can be read as int.
-rw-r--r--cli/main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/main.cpp b/cli/main.cpp
index 0008cba..dbeb894 100644
--- a/cli/main.cpp
+++ b/cli/main.cpp
@@ -376,8 +376,10 @@ int startDiceParsing(QStringList& cmds, QString& treeFile, bool withColor, EXPOR
stringResult.replace(QStringLiteral("µ%1").arg(i), (*it));
--i;
}
-
- resultStr= stringResult;
+ bool isInt= true;
+ stringResult.toInt(&isInt);
+ if(!isInt)
+ resultStr= stringResult;
}
if(format == BOT)
{