From 14b2b264097cebb05237164f7320ad4b4fbbfba0 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Tue, 31 Mar 2020 19:46:23 +0200 Subject: Don't display string result if it can be read as int. --- cli/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cli') 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) { -- cgit v1.2.3-70-g09d2