aboutsummaryrefslogtreecommitdiff
path: root/sam.c
diff options
context:
space:
mode:
Diffstat (limited to 'sam.c')
-rw-r--r--sam.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sam.c b/sam.c
index 0c1ffee..f3b4242 100644
--- a/sam.c
+++ b/sam.c
@@ -493,8 +493,10 @@ static const CommandDef *command_lookup(Vis *vis, const char *name) {
}
static Command *command_parse(Vis *vis, const char **s, int level, enum SamError *err) {
- if (!**s)
+ if (!**s) {
+ *err = SAM_ERR_COMMAND;
return NULL;
+ }
Command *cmd = command_new(NULL);
if (!cmd)
return NULL;