diff --git a/expr.c b/expr.c index bd2463c..f43f72b 100644 --- a/expr.c +++ b/expr.c @@ -380,8 +380,14 @@ char *expand(const char *name, const struct frame *frame) if (*s != '{') { while (is_id_char(*s, s == s0)) s++; - if (s == s0) - goto invalid; + if (s == s0) { + if (*s) + goto invalid; + else { + fail("incomplete variable name"); + goto fail; + } + } var = strnalloc(s0, s-s0); len -= s-s0+1; s--; diff --git a/inst.c b/inst.c index 84c7b30..c4c9ffc 100644 --- a/inst.c +++ b/inst.c @@ -792,6 +792,7 @@ static int validate_pad_name(const char *s, void *ctx) { char *tmp; + status_begin_reporting(); tmp = expand(s, NULL); if (!tmp) return 0;