From: Steinar H. Gunderson Date: Thu, 1 Oct 2020 16:02:32 +0000 (+0200) Subject: Fix the early abort for zero-trigrams again. X-Git-Tag: 1.0.0~72 X-Git-Url: https://git.sesse.net/?p=plocate;a=commitdiff_plain;h=0947d3f7499bec3e193034126776a81959efdd15 Fix the early abort for zero-trigrams again. --- diff --git a/plocate.cpp b/plocate.cpp index 8ba5aa8..7a4de8f 100644 --- a/plocate.cpp +++ b/plocate.cpp @@ -328,7 +328,7 @@ void do_search_file(const vector &needles, const char *filename) corpus.find_trigram(trgm, [trgm, &trigrams](const Trigram *trgmptr, size_t len) { if (trgmptr == nullptr) { dprintf("trigram %06x isn't found, we abort the search\n", trgm); - return; + exit(0); } trigrams.emplace_back(*trgmptr, len); });