Skip to content

Commit 91b3f32

Browse files
authored
Merge pull request #10599 from tannewt/fix_uninit_lvfontio_slot_count
Fix lvfontio memory allocation with fixed width fonts
2 parents 3d4118a + 7fd8b48 commit 91b3f32

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

shared-module/lvfontio/OnDiskFont.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,10 @@ static bool load_font_header(lvfontio_ondiskfont_t *self, FIL *file, size_t *max
253253
*max_slots = advance_count[1] * 2 + advance_count[0];
254254
}
255255
}
256+
} else {
257+
*max_slots = advance_count[0] + advance_count[1];
256258
}
257259

258-
259260
found_glyf = true;
260261
}
261262

0 commit comments

Comments
 (0)