summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-02-27 14:36:24 -0500
committerTavian Barnes <tavianator@tavianator.com>2016-02-27 14:36:24 -0500
commit0cc26b741deffefe181981022321549a3ed2bcff (patch)
tree0d6afc4717bd6fb40be2ea5daedc1ef52644b6ec
parentba967212e94110986e4b7512a75a9e8aa519fd19 (diff)
downloadbfs-0cc26b741deffefe181981022321549a3ed2bcff.tar.xz
Fix a typo that caused a segfault with missing arguments.
-rw-r--r--parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index aeac611..2fc4fd8 100644
--- a/parse.c
+++ b/parse.c
@@ -343,7 +343,7 @@ static struct expr *parse_nullary_test(struct parser_state *state, eval_fn *eval
static struct expr *parse_unary_test(struct parser_state *state, eval_fn *eval) {
const char *arg = state->args[0];
const char *value = state->args[1];
- if (!*value) {
+ if (!value) {
pretty_error(state->cmdline->stderr_colors,
"error: %s needs a value.\n", arg);
return NULL;