diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-05-29 10:51:50 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-05-29 10:51:50 +0200 |
| commit | e419d484245bf20f01c4b04da78cd15fbaac6366 (patch) | |
| tree | a254b2975e54db43c2957a19898aeaa61e1b19db /sam.c | |
| parent | 39e089cc057f141ed440635493a041dc321eb2c3 (diff) | |
| download | vis-e419d484245bf20f01c4b04da78cd15fbaac6366.tar.gz vis-e419d484245bf20f01c4b04da78cd15fbaac6366.tar.xz | |
sam: use more suitable error message if no command is given
Diffstat (limited to 'sam.c')
| -rw-r--r-- | sam.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |
