diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2015-02-21 15:05:28 +0000 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2015-02-21 15:05:28 +0000 |
commit | f68a81cce3808ca1535ff960160cf6f09cb75707 (patch) | |
tree | 798aa9bf635414fd63463ebd258f9c120089611a /Build/source/texk/dvipdfm-x/dvi.c | |
parent | fbacf8fd2a4e22df4f740fa28cc1da0d556e957f (diff) |
Fix crash in xdvipdfmx-bkm test
git-svn-id: svn://tug.org/texlive/trunk@36334 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/dvi.c')
-rw-r--r-- | Build/source/texk/dvipdfm-x/dvi.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Build/source/texk/dvipdfm-x/dvi.c b/Build/source/texk/dvipdfm-x/dvi.c index 47b66c70c8d..2d201afce27 100644 --- a/Build/source/texk/dvipdfm-x/dvi.c +++ b/Build/source/texk/dvipdfm-x/dvi.c @@ -797,6 +797,8 @@ dvi_locate_font (const char *tfm_name, spt_t ptsize) subfont_id = sfd_load_record(mrec->charmap.sfd_name, mrec->charmap.subfont_id); } + memset(&loaded_fonts[cur_id], 0, sizeof (struct loaded_font)); + /* TFM must exist here. */ loaded_fonts[cur_id].tfm_id = tfm_open(tfm_name, 1); loaded_fonts[cur_id].subfont_id = subfont_id; @@ -941,6 +943,9 @@ dvi_locate_native_font (const char *filename, uint32_t index, /* FIXME: would be more efficient if pdf_load_native_font returned the mrec ptr (or NULL for error) so we could avoid doing a second lookup for the item we just inserted */ } + + memset(&loaded_fonts[cur_id], 0, sizeof (struct loaded_font)); + loaded_fonts[cur_id].font_id = pdf_dev_locate_font(fontmap_key, ptsize); loaded_fonts[cur_id].size = ptsize; loaded_fonts[cur_id].type = NATIVE; |