Skip to content

Commit

Permalink
Fix ScriptDetector::detect_blob for the case of when scores contains …
Browse files Browse the repository at this point in the history
…a list with a single LargeSpeckle BLOCB_CHOICE
  • Loading branch information
Roman Zelenyi authored and Roman Zelenyi committed Nov 18, 2024
1 parent 64eab6c commit c983033
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ccmain/osdetect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c983033

Please sign in to comment.