]> git.sesse.net Git - plocate/commitdiff
Fix the early abort for zero-trigrams again.
authorSteinar H. Gunderson <steinar+git@gunderson.no>
Thu, 1 Oct 2020 16:02:32 +0000 (18:02 +0200)
committerSteinar H. Gunderson <steinar+git@gunderson.no>
Thu, 1 Oct 2020 16:02:32 +0000 (18:02 +0200)
plocate.cpp

index 8ba5aa8aeea1fb660798d06f10f3d6d160c3facf..7a4de8f91de51b534e82a17e668c3fdafff3e3ea 100644 (file)
@@ -328,7 +328,7 @@ void do_search_file(const vector<string> &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);
                        });