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>
|
template <typename M>
|
||||||
M *addCommands(M *macro, const std::string &args, bool trusted) {
|
M *addCommands(M *macro, const std::string &args, bool trusted) {
|
||||||
|
|
||||||
std::string blah;
|
std::string remainder;
|
||||||
std::list<std::string> cmds;
|
std::list<std::string> cmds;
|
||||||
StringUtil::stringTokensBetween(cmds, args, blah, '{', '}');
|
StringUtil::stringTokensBetween(cmds, args, remainder, '{', '}');
|
||||||
RefCount<Command<void> > cmd(0);
|
RefCount<Command<void> > cmd(0);
|
||||||
|
|
||||||
std::list<std::string>::iterator it = cmds.begin(), it_end = cmds.end();
|
if (remainder.length() == 0) {
|
||||||
for (; it != it_end; ++it) {
|
std::list<std::string>::iterator it = cmds.begin(), it_end = cmds.end();
|
||||||
cmd = CommandParser<void>::instance().parse(*it, trusted);
|
for (; it != it_end; ++it) {
|
||||||
if (*cmd)
|
cmd = CommandParser<void>::instance().parse(*it, trusted);
|
||||||
macro->add(cmd);
|
if (*cmd)
|
||||||
|
macro->add(cmd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (macro->size() > 0)
|
if (macro->size() > 0)
|
||||||
|
|
Loading…
Reference in a new issue