diff --git a/util/font-options.hh b/util/font-options.hh index 62ced8e7a..327214a71 100644 --- a/util/font-options.hh +++ b/util/font-options.hh @@ -173,7 +173,7 @@ parse_variations (const char *name G_GNUC_UNUSED, p = s; do { font_opts->num_variations++; - p = strchr (p, ','); + p = strpbrk (p, ", "); if (p) p++; } while (p); @@ -186,7 +186,7 @@ parse_variations (const char *name G_GNUC_UNUSED, p = s; font_opts->num_variations = 0; while (p && *p) { - char *end = strchr (p, ','); + char *end = strpbrk (p, ", "); if (hb_variation_from_string (p, end ? end - p : -1, &font_opts->variations[font_opts->num_variations])) font_opts->num_variations++; p = end ? end + 1 : nullptr; diff --git a/util/shape-options.hh b/util/shape-options.hh index 5a15c0798..0f41c0a13 100644 --- a/util/shape-options.hh +++ b/util/shape-options.hh @@ -218,7 +218,7 @@ parse_features (const char *name G_GNUC_UNUSED, p = s; do { shape_opts->num_features++; - p = strchr (p, ','); + p = strpbrk (p, ", "); if (p) p++; } while (p); @@ -231,7 +231,7 @@ parse_features (const char *name G_GNUC_UNUSED, p = s; shape_opts->num_features = 0; while (p && *p) { - char *end = strchr (p, ','); + char *end = strpbrk (p, ", "); if (hb_feature_from_string (p, end ? end - p : -1, &shape_opts->features[shape_opts->num_features])) shape_opts->num_features++; p = end ? end + 1 : nullptr;