From 70658ae852c13cf5c4cce4990c0ee8ea928e84e7 Mon Sep 17 00:00:00 2001 From: jmeaster30 Date: Mon, 17 Apr 2023 22:07:18 -0400 Subject: [PATCH] Realized better fix the second I pushed the last change --- libvore/engine.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libvore/engine.go b/libvore/engine.go index c952831..b048772 100644 --- a/libvore/engine.go +++ b/libvore/engine.go @@ -446,10 +446,15 @@ func compare(a string, b string, caseless bool) bool { func (es *SearchEngineState) MATCH(value string, not bool, caseless bool) { comp := es.READ(len(value)) + if len(comp) == 0 { + es.BACKTRACK() + return + } + if !not && compare(value, comp, caseless) { es.CONSUME(len(value)) es.NEXT() - } else if not && !compare(value, comp, caseless) && len(comp) > 0 { + } else if not && !compare(value, comp, caseless) { es.CONSUME(len(value)) es.NEXT() } else {