aboutsummaryrefslogtreecommitdiff
path: root/src/FbCommandFactory.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbCommandFactory.cc')
-rw-r--r--src/FbCommandFactory.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/FbCommandFactory.cc b/src/FbCommandFactory.cc
index 92099f2..8f5dcf8 100644
--- a/src/FbCommandFactory.cc
+++ b/src/FbCommandFactory.cc
@@ -809,17 +809,16 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command,
809 pos = err; 809 pos = err;
810 err = FbTk::StringUtil::getStringBetween(cmd, arguments.c_str() + pos, 810 err = FbTk::StringUtil::getStringBetween(cmd, arguments.c_str() + pos,
811 '{', '}', " \t\n", true); 811 '{', '}', " \t\n", true);
812 if (err > 0) 812 if (err == 0)
813 t = CommandParser::instance().parseLine(cmd, trusted);
814 if (err == 0 || *t == 0)
815 return 0; 813 return 0;
814 t = CommandParser::instance().parseLine(cmd, trusted);
816 815
817 pos += err; 816 pos += err;
818 err = FbTk::StringUtil::getStringBetween(cmd, arguments.c_str() + pos, 817 err = FbTk::StringUtil::getStringBetween(cmd, arguments.c_str() + pos,
819 '{', '}', " \t\n", true); 818 '{', '}', " \t\n", true);
820 if (err > 0) 819 if (err > 0)
821 f = CommandParser::instance().parseLine(cmd, trusted); 820 f = CommandParser::instance().parseLine(cmd, trusted);
822 if (err == 0 || *f == 0) 821 if (err == 0 || *t == 0 && *f == 0)
823 return 0; 822 return 0;
824 823
825 return new FbTk::IfCommand(cond, t, f); 824 return new FbTk::IfCommand(cond, t, f);