From 01832fd16b605971466fc3b174cb932787ef4bfb Mon Sep 17 00:00:00 2001 From: Michiharu Ariza Date: Wed, 26 Jun 2019 15:58:38 -0700 Subject: [PATCH] alternate fix for https://crbug.com/971933 --- src/hb-cff-interp-cs-common.hh | 6 +++--- src/hb-cff1-interp-cs.hh | 2 +- src/hb-cff2-interp-cs.hh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hb-cff-interp-cs-common.hh b/src/hb-cff-interp-cs-common.hh index 1cfbba603..cf9ce4dc3 100644 --- a/src/hb-cff-interp-cs-common.hh +++ b/src/hb-cff-interp-cs-common.hh @@ -62,9 +62,9 @@ struct call_stack_t : stack_t {}; template struct biased_subrs_t { - void init (const SUBRS &subrs_) + void init (const SUBRS *subrs_) { - subrs = &subrs_; + subrs = subrs_; unsigned int nSubrs = get_count (); if (nSubrs < 1240) bias = 107; @@ -118,7 +118,7 @@ struct point_t template struct cs_interp_env_t : interp_env_t { - void init (const byte_str_t &str, const SUBRS &globalSubrs_, const SUBRS &localSubrs_) + void init (const byte_str_t &str, const SUBRS *globalSubrs_, const SUBRS *localSubrs_) { interp_env_t::init (str); diff --git a/src/hb-cff1-interp-cs.hh b/src/hb-cff1-interp-cs.hh index cc528564c..1c8762c17 100644 --- a/src/hb-cff1-interp-cs.hh +++ b/src/hb-cff1-interp-cs.hh @@ -40,7 +40,7 @@ struct cff1_cs_interp_env_t : cs_interp_env_t template void init (const byte_str_t &str, ACC &acc, unsigned int fd) { - SUPER::init (str, *acc.globalSubrs, *acc.privateDicts[fd].localSubrs); + SUPER::init (str, acc.globalSubrs, acc.privateDicts[fd].localSubrs); processed_width = false; has_width = false; arg_start = 0; diff --git a/src/hb-cff2-interp-cs.hh b/src/hb-cff2-interp-cs.hh index 1faf20831..a72100e1a 100644 --- a/src/hb-cff2-interp-cs.hh +++ b/src/hb-cff2-interp-cs.hh @@ -82,7 +82,7 @@ struct cff2_cs_interp_env_t : cs_interp_env_t void init (const byte_str_t &str, ACC &acc, unsigned int fd, const int *coords_=nullptr, unsigned int num_coords_=0) { - SUPER::init (str, *acc.globalSubrs, *acc.privateDicts[fd].localSubrs); + SUPER::init (str, acc.globalSubrs, acc.privateDicts[fd].localSubrs); coords = coords_; num_coords = num_coords_;