diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/grab.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -302,6 +302,8 @@ comppat(char8_t *s) if (s - p == 0) { if (op.c != 'h') diex("Empty regex given to ‘%c’", op.c); + if (ops.len == 0) + diex("Empty ‘h’ is not allowed as the first operator"); op.pat = ops.buf[ops.len - 1].pat; } else op.pat = mkregex(p, s - p); |