[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Mon Dec 4 21:10:29 UTC 2017


 src/hb-common.cc |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 85bb89a88bdfae02fb7c27c7b994f4f22723442a
Author: David Corbett <corbett.dav at husky.neu.edu>
Date:   Mon Dec 4 15:15:27 2017 -0500

    Fix string matching in parse_bool

diff --git a/src/hb-common.cc b/src/hb-common.cc
index 92720d9e..cb1fb43f 100644
--- a/src/hb-common.cc
+++ b/src/hb-common.cc
@@ -784,9 +784,9 @@ parse_bool (const char **pp, const char *end, uint32_t *pv)
     (*pp)++;
 
   /* CSS allows on/off as aliases 1/0. */
-  if (*pp - p == 2 || 0 == strncmp (p, "on", 2))
+  if (*pp - p == 2 && 0 == strncmp (p, "on", 2))
     *pv = 1;
-  else if (*pp - p == 3 || 0 == strncmp (p, "off", 2))
+  else if (*pp - p == 3 && 0 == strncmp (p, "off", 3))
     *pv = 0;
   else
     return false;


More information about the HarfBuzz mailing list