Fixed issue 272

git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@335 d0cd1f9f-072b-0410-8dd7-cf729c803f20
This commit is contained in:
theraysmith 2010-05-19 18:48:59 +00:00
parent c9b3b33b67
commit aea5be1995

View File

@ -311,6 +311,8 @@ WERD_CHOICE *Dict::dawg_permute_and_select(
word.set_rating(0.0);
word.set_certainty(0.0);
if (word.length() + char_choices.length() > MAX_WERD_LENGTH) {
delete[] active_dawgs;
delete[] constraints;
return best_choice; // the word is too long to permute
}
float certainties[MAX_WERD_LENGTH];