Skip to content

Commit 0fd4134

Browse files
committed
Initialize output parameters of word_char_quality() to zero before early exit
1 parent 73b2898 commit 0fd4134

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ccmain/docqual.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,11 @@ void Tesseract::word_char_quality(WERD_RES *word,
9999
inT16 *match_count,
100100
inT16 *accepted_match_count) {
101101
if (word->bln_boxes == NULL ||
102-
word->rebuild_word == NULL || word->rebuild_word->blobs.empty())
102+
word->rebuild_word == NULL || word->rebuild_word->blobs.empty()) {
103+
*match_count = 0;
104+
*accepted_match_count = 0;
103105
return;
106+
}
104107

105108
DocQualCallbacks cb(word);
106109
word->bln_boxes->ProcessMatchedBlobs(

0 commit comments

Comments
 (0)