Error on incomplete MacroCmd key command
This commit is contained in:
parent
a56e409b1f
commit
ff6a46391f
1 changed files with 9 additions and 7 deletions
|
@ -33,16 +33,18 @@ namespace {
|
|||
template <typename M>
|
||||
M *addCommands(M *macro, const std::string &args, bool trusted) {
|
||||
|
||||
std::string blah;
|
||||
std::string remainder;
|
||||
std::list<std::string> cmds;
|
||||
StringUtil::stringTokensBetween(cmds, args, blah, '{', '}');
|
||||
StringUtil::stringTokensBetween(cmds, args, remainder, '{', '}');
|
||||
RefCount<Command<void> > cmd(0);
|
||||
|
||||
std::list<std::string>::iterator it = cmds.begin(), it_end = cmds.end();
|
||||
for (; it != it_end; ++it) {
|
||||
cmd = CommandParser<void>::instance().parse(*it, trusted);
|
||||
if (*cmd)
|
||||
macro->add(cmd);
|
||||
if (remainder.length() == 0) {
|
||||
std::list<std::string>::iterator it = cmds.begin(), it_end = cmds.end();
|
||||
for (; it != it_end; ++it) {
|
||||
cmd = CommandParser<void>::instance().parse(*it, trusted);
|
||||
if (*cmd)
|
||||
macro->add(cmd);
|
||||
}
|
||||
}
|
||||
|
||||
if (macro->size() > 0)
|
||||
|
|
Loading…
Reference in a new issue