Skip to content

Commit

Permalink
fix: propagate error returned by emit_clone
Browse files Browse the repository at this point in the history
  • Loading branch information
plusvic committed Sep 12, 2023
1 parent b04ed76 commit cef8577
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yara-x/src/re/thompson/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ impl Compiler {
// The first copy of `e` has already been emitted while
// visiting the child nodes. Make min - 1 clones of `e`.
for _ in 0..min.saturating_sub(1) {
self.emit_clone(start, end);
self.emit_clone(start, end)?;
}

// If min == 0 the first split and `e` are already emitted (the
Expand All @@ -701,7 +701,7 @@ impl Compiler {
Instr::SPLIT_B
});
self.bookmarks.push(split);
self.emit_clone(start, end);
self.emit_clone(start, end)?;
}

if min > 1 {
Expand Down

0 comments on commit cef8577

Please sign in to comment.