blob: 7d71be992aac9a69db3cb6e7dccd0cb0d469179b [file] [log] [blame]
From ead0b5bee31a6e2756749a5c8fb6508e49b64703 Mon Sep 17 00:00:00 2001
From: Chris Liddell <chris.liddell@artifex.com>
Date: Mon, 15 Jan 2018 13:48:27 +0000
Subject: [PATCH] Bug 698856: Ensure is_glyph_index flag is consistently set
The is_glyph_index is (now) set as a local variable, then copied to
the structure before the ps_get_glyphname_or_cid() function returns.
A couple of branches in the code were still setting the structure value directly
meaning the local variable was wrong.
---
psi/zfapi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/psi/zfapi.c b/psi/zfapi.c
index ceca322ee..774cc4d90 100644
--- a/psi/zfapi.c
+++ b/psi/zfapi.c
@@ -2028,7 +2028,7 @@ ps_get_glyphname_or_cid(gs_text_enum_t *penum,
c = gid->value.intval;
}
cr->char_codes[0] = c;
- cr->is_glyph_index = is_glyph_index;
+ is_glyph_index = is_glyph_index;
/* fixme : process the narrow/wide/proportional mapping type,
using src_type, dst_type. Should adjust the 'matrix' above.
Call get_font_proportional_feature for proper choice.
@@ -2152,7 +2152,7 @@ ps_get_glyphname_or_cid(gs_text_enum_t *penum,
return (gs_error_invalidfont);
#endif
}
- cr->is_glyph_index = true;
+ is_glyph_index = true;
}
else if (is_embedded_type1) {
/* Since the client passes charstring by callback using I->ff.char_data,
--
2.16.0.rc1.238.g530d649a79-goog