diff options
| author | 2020-03-31 19:46:23 +0200 | |
|---|---|---|
| committer | 2020-03-31 19:46:23 +0200 | |
| commit | 14b2b264097cebb05237164f7320ad4b4fbbfba0 (patch) | |
| tree | 85231c7bcfb924adb352cb1fe41550cd3bb1735f | |
| parent | 72eb6974dbbca3dd2b490d78f57683157bb4e6cf (diff) | |
| download | OneRoll-14b2b264097cebb05237164f7320ad4b4fbbfba0.tar.gz OneRoll-14b2b264097cebb05237164f7320ad4b4fbbfba0.zip | |
Don't display string result if it can be read as int.
| -rw-r--r-- | cli/main.cpp | 6 |
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) { |