From c983033c43510f187e617ac99dfa905961e465dc Mon Sep 17 00:00:00 2001 From: Roman Zelenyi Date: Wed, 1 Mar 2023 16:28:59 -0800 Subject: [PATCH] Fix ScriptDetector::detect_blob for the case of when scores contains a list with a single LargeSpeckle BLOCB_CHOICE --- src/ccmain/osdetect.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ccmain/osdetect.cpp b/src/ccmain/osdetect.cpp index 64a8bd6375..84adaa96c7 100644 --- a/src/ccmain/osdetect.cpp +++ b/src/ccmain/osdetect.cpp @@ -479,6 +479,8 @@ void ScriptDetector::detect_blob(BLOB_CHOICE_LIST *scores) { for (choice_it.mark_cycle_pt(); !choice_it.cycled_list(); choice_it.forward()) { BLOB_CHOICE *choice = choice_it.data(); int id = choice->script_id(); + if (id < 0) // "large speckle" BLOB_CHOICE object ? + continue; if (allowed_scripts_ != nullptr && !allowed_scripts_->empty()) { // Check that the choice is in an allowed script. size_t s = 0;