From 959b34db025d49a523913d8b45275286691169d1 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sat, 7 Dec 2019 20:57:36 -0500 Subject: Stop after the first matcher to match --- unscoop.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'unscoop.c') diff --git a/unscoop.c b/unscoop.c index 782ce7f..6d757a8 100644 --- a/unscoop.c +++ b/unscoop.c @@ -201,6 +201,8 @@ static void matchLine( int error = regexec(®ex[i], line, ParamCap, match, 0); if (error) continue; + sqlite3_reset(insertName); + sqlite3_reset(insertEvent); sqlite3_clear_bindings(insertName); sqlite3_clear_bindings(insertEvent); @@ -219,8 +221,7 @@ static void matchLine( dbStep(insertName); dbStep(insertEvent); - sqlite3_reset(insertName); - sqlite3_reset(insertEvent); + break; } } -- cgit 1.4.1