From 7aa23f3597e4783b88ad526021cc4cafc05395f2 Mon Sep 17 00:00:00 2001 From: Michiharu Ariza Date: Wed, 15 Aug 2018 15:00:32 -0700 Subject: [PATCH] fix build attempt ^4 --- src/hb-cff-interp-cs.hh | 10 +++++----- src/hb-subset-cff.cc | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/hb-cff-interp-cs.hh b/src/hb-cff-interp-cs.hh index 7b0a5aa54..867ef24a2 100644 --- a/src/hb-cff-interp-cs.hh +++ b/src/hb-cff-interp-cs.hh @@ -116,11 +116,11 @@ struct CFFCSOpSet : CSOpSet return true; case OpCode_and: if (unlikely (!env.argStack.check_pop_num2 (n1, n2))) return false; - env.argStack.push_int ((n1.to_real() != 0.0f) && (n1.to_real() != 0.0f)); + env.argStack.push_int ((n1.to_real() != 0.0f) && (n2.to_real() != 0.0f)); break; case OpCode_or: if (unlikely (!env.argStack.check_pop_num2 (n1, n2))) return false; - env.argStack.push_int ((n1.to_real() != 0.0f) || (n1.to_real() != 0.0f)); + env.argStack.push_int ((n1.to_real() != 0.0f) || (n2.to_real() != 0.0f)); break; case OpCode_not: if (unlikely (!env.argStack.check_pop_num (n1))) return false; @@ -132,11 +132,11 @@ struct CFFCSOpSet : CSOpSet break; case OpCode_add: if (unlikely (!env.argStack.check_pop_num2 (n1, n2))) return false; - env.argStack.push_real (n1.to_real() + n1.to_real()); + env.argStack.push_real (n1.to_real() + n2.to_real()); break; case OpCode_sub: if (unlikely (!env.argStack.check_pop_num2 (n1, n2))) return false; - env.argStack.push_real (n1.to_real() - n1.to_real()); + env.argStack.push_real (n1.to_real() - n2.to_real()); break; case OpCode_div: if (unlikely (!env.argStack.check_pop_num2 (n1, n2))) return false; @@ -151,7 +151,7 @@ struct CFFCSOpSet : CSOpSet break; case OpCode_eq: if (unlikely (!env.argStack.check_pop_num2 (n1, n2))) return false; - env.argStack.push_int (n1.to_real() == n1.to_real()); + env.argStack.push_int (n1.to_real() == n2.to_real()); break; case OpCode_drop: if (unlikely (!env.argStack.check_pop_num (n1))) return false; diff --git a/src/hb-subset-cff.cc b/src/hb-subset-cff.cc index c14aaf13b..3d47e22ed 100644 --- a/src/hb-subset-cff.cc +++ b/src/hb-subset-cff.cc @@ -209,7 +209,7 @@ struct CFFCSOpSet_SubrSubset : CFFCSOpSet default: break; } - return CFFCSOpSet::process_op (op, env, refMapPair); + return CFFCSOpSet::process_op (op, env, refMapPair); } };