summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-06-29 17:09:11 -0700
committerKaz Kylheku <kaz@kylheku.com>2024-06-29 17:09:11 -0700
commita887ac934393d417673b35fad0f22d5087901582 (patch)
tree9baf205028c7c47a001c957ecbe520d8d1afd935
parentd65170ceaf4c3ee79bfdf52f0fcf1157ef052718 (diff)
downloadtxr-a887ac934393d417673b35fad0f22d5087901582.tar.gz
txr-a887ac934393d417673b35fad0f22d5087901582.tar.bz2
txr-a887ac934393d417673b35fad0f22d5087901582.zip
txr: bugfix: reset top flag when copying context.
* match.c (match_files): This function sometimes receives a copy of a top-marked context. The copy must not be top-marked, or very bad things happen.
-rw-r--r--match.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/match.c b/match.c
index 4924fe8f..451fac24 100644
--- a/match.c
+++ b/match.c
@@ -5077,6 +5077,7 @@ out:
static val match_files(match_files_ctx c)
{
+ c.top = 0;
return match_files_byref(&c);
}