From 70e09294fca1022d9370fe2fd631a98480c284b2 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Fri, 16 Sep 2016 20:35:11 +0200 Subject: -Fix some value on diceparser. --- cli/main.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'cli') diff --git a/cli/main.cpp b/cli/main.cpp index 21bb1ca..64f01ab 100644 --- a/cli/main.cpp +++ b/cli/main.cpp @@ -116,8 +116,7 @@ void startDiceParsing(QString& cmd,QString& treeFile,bool highlight) if(parser->parseLine(cmd)) { // - if(treeFile.isEmpty()) - { + parser->Start(); if(!parser->getErrorMap().isEmpty()) { @@ -150,11 +149,10 @@ void startDiceParsing(QString& cmd,QString& treeFile,bool highlight) str = parser->getStringResult(); } out << str << "\n"; - } - else - { - parser->writeDownDotTree(treeFile); - } + if(!treeFile.isEmpty()) + { + parser->writeDownDotTree(treeFile); + } } else { -- cgit v1.2.3-70-g09d2