Applied patch to fix issue 1098

git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@1066 d0cd1f9f-072b-0410-8dd7-cf729c803f20
This commit is contained in:
theraysmith@gmail.com 2014-04-23 23:28:01 +00:00
parent bfb0e392d1
commit a9f483cffc

View File

@ -186,6 +186,7 @@ bool read_spacing_info(FILE *f, FontInfo* fi, bool swap) {
if (fread(&fs->x_gap_before, sizeof(fs->x_gap_before), 1, f) != 1 ||
fread(&fs->x_gap_after, sizeof(fs->x_gap_after), 1, f) != 1 ||
fread(&kern_size, sizeof(kern_size), 1, f) != 1) {
delete fs;
return false;
}
if (swap) {
@ -199,6 +200,7 @@ bool read_spacing_info(FILE *f, FontInfo* fi, bool swap) {
}
if (kern_size > 0 && (!fs->kerned_unichar_ids.DeSerialize(swap, f) ||
!fs->kerned_x_gaps.DeSerialize(swap, f))) {
delete fs;
return false;
}
fi->add_spacing(i, fs);