Skip to content

Commit

Permalink
Merge pull request #89 from ceisserer/master
Browse files Browse the repository at this point in the history
Initialize output parameters of word_char_quality() to zero before early exit
  • Loading branch information
egorpugin committed Feb 17, 2016
2 parents 8c7d158 + 0fd4134 commit f4366c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ccmain/docqual.cpp
Expand Up @@ -99,8 +99,11 @@ void Tesseract::word_char_quality(WERD_RES *word,
inT16 *match_count,
inT16 *accepted_match_count) {
if (word->bln_boxes == NULL ||
word->rebuild_word == NULL || word->rebuild_word->blobs.empty())
word->rebuild_word == NULL || word->rebuild_word->blobs.empty()) {
*match_count = 0;
*accepted_match_count = 0;
return;
}

DocQualCallbacks cb(word);
word->bln_boxes->ProcessMatchedBlobs(
Expand Down

0 comments on commit f4366c1

Please sign in to comment.