aboutsummaryrefslogtreecommitdiff
path: root/bp.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-10-01 19:29:31 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-10-01 19:29:31 -0700
commit0ad64a1006f10dcb6e431985f3c26816f50f64d1 (patch)
treef10146ca8b6db5be0f775363a9628e541e33db04 /bp.c
parent73bbf6872a3ec5d9dd8d0d587b00056c59bcbd30 (diff)
Bugfix for use-after-free, as well as an issue with the order
grammars were loaded
Diffstat (limited to 'bp.c')
-rw-r--r--bp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bp.c b/bp.c
index 6efbe3d..e094a7a 100644
--- a/bp.c
+++ b/bp.c
@@ -521,7 +521,7 @@ static int process_git_files(pat_t *pattern, int argc, char *argv[])
//
static pat_t *load_grammar(pat_t *defs, file_t *f)
{
- return chain_together(defs, assert_pat(f->start, f->end, bp_pattern(f->start, f->end)));
+ return chain_together(assert_pat(f->start, f->end, bp_pattern(f->start, f->end)), defs);
}
//