From 1eab8af155fe6037dc81d654e20b1ac19487d502 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 2 Aug 2021 12:52:58 -0700 Subject: Bugfix for postfix operators --- pattern.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'pattern.c') diff --git a/pattern.c b/pattern.c index a521389..a0efd26 100644 --- a/pattern.c +++ b/pattern.c @@ -197,9 +197,7 @@ static pat_t *bp_simplepattern(file_t *f, const char *str) { pat_t *pat = _bp_simplepattern(f, str); if (pat == NULL) return pat; - - if (pat->end == NULL) - errx(EXIT_FAILURE, "pat->end is uninitialized!"); + str = pat->end; // Expand postfix operators (if any) while (str < f->end) { -- cgit v1.2.3