diff options
author | Jim Ramsay <i.am@jimramsay.com> | 2009-04-08 14:57:04 (GMT) |
---|---|---|
committer | Jim Ramsay <i.am@jimramsay.com> | 2009-05-26 20:27:31 (GMT) |
commit | ff6a46391f29922476556f8f198730610f3707c2 (patch) | |
tree | 4e5980a3443874b2f9620a11977fc6e967464a85 /src/FbTk | |
parent | a56e409b1fdf8a4a388dfe61e770bf4e8f4c0d8e (diff) | |
download | fluxbox-ff6a46391f29922476556f8f198730610f3707c2.zip fluxbox-ff6a46391f29922476556f8f198730610f3707c2.tar.bz2 |
Error on incomplete MacroCmd key command
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/MacroCommand.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/FbTk/MacroCommand.cc b/src/FbTk/MacroCommand.cc index 511683b..555e5f5 100644 --- a/src/FbTk/MacroCommand.cc +++ b/src/FbTk/MacroCommand.cc | |||
@@ -33,16 +33,18 @@ namespace { | |||
33 | template <typename M> | 33 | template <typename M> |
34 | M *addCommands(M *macro, const std::string &args, bool trusted) { | 34 | M *addCommands(M *macro, const std::string &args, bool trusted) { |
35 | 35 | ||
36 | std::string blah; | 36 | std::string remainder; |
37 | std::list<std::string> cmds; | 37 | std::list<std::string> cmds; |
38 | StringUtil::stringTokensBetween(cmds, args, blah, '{', '}'); | 38 | StringUtil::stringTokensBetween(cmds, args, remainder, '{', '}'); |
39 | RefCount<Command<void> > cmd(0); | 39 | RefCount<Command<void> > cmd(0); |
40 | 40 | ||
41 | std::list<std::string>::iterator it = cmds.begin(), it_end = cmds.end(); | 41 | if (remainder.length() == 0) { |
42 | for (; it != it_end; ++it) { | 42 | std::list<std::string>::iterator it = cmds.begin(), it_end = cmds.end(); |
43 | cmd = CommandParser<void>::instance().parse(*it, trusted); | 43 | for (; it != it_end; ++it) { |
44 | if (*cmd) | 44 | cmd = CommandParser<void>::instance().parse(*it, trusted); |
45 | macro->add(cmd); | 45 | if (*cmd) |
46 | macro->add(cmd); | ||
47 | } | ||
46 | } | 48 | } |
47 | 49 | ||
48 | if (macro->size() > 0) | 50 | if (macro->size() > 0) |