aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-08-02 12:52:58 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-08-02 12:52:58 -0700
commit1eab8af155fe6037dc81d654e20b1ac19487d502 (patch)
tree594e68c3f2e602af158754b0bcd6276ff1fd7123
parent70f7f8c4958b6458708187278f9a8fbca34ef542 (diff)
Bugfix for postfix operators
-rw-r--r--pattern.c4
1 files changed, 1 insertions, 3 deletions
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) {