aboutsummaryrefslogtreecommitdiff
path: root/sam.c
diff options
context:
space:
mode:
Diffstat (limited to 'sam.c')
-rw-r--r--sam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sam.c b/sam.c
index baaa365..0e94b8c 100644
--- a/sam.c
+++ b/sam.c
@@ -407,7 +407,7 @@ static Command *command_parse(Vis *vis, const char **s, int level, enum SamError
cmd->count = parse_number(s);
if (cmddef->flags & CMD_REGEX) {
- if (cmddef->flags & CMD_REGEX_DEFAULT && **s == ' ') {
+ if ((cmddef->flags & CMD_REGEX_DEFAULT) && (!**s || **s == ' ')) {
skip_spaces(s);
} else if (!(cmd->regex = parse_regex(vis, s))) {
*err = SAM_ERR_REGEX;