From 521c7013abab84a0994fda3977ccd1ba3d496242 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Tue, 30 Jul 2019 18:10:40 +0430 Subject: [PATCH] [cpal] revert port to dagger It has a different semantic, maybe we should just do a zero memset, letting Behdad to decide. --- src/hb-ot-color-cpal-table.hh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/hb-ot-color-cpal-table.hh b/src/hb-ot-color-cpal-table.hh index 2d2fcf8c7..9ec2957ea 100644 --- a/src/hb-ot-color-cpal-table.hh +++ b/src/hb-ot-color-cpal-table.hh @@ -146,9 +146,8 @@ struct CPAL /* Always return numColors colors per palette even if it has out-of-bounds start index. */ unsigned int count = hb_min ((unsigned) hb_max ((int) (numColors - start_offset), 0), *color_count); *color_count = count; - + segment_colors - | hb_sink (hb_array (colors, count)) - ; + for (unsigned int i = 0; i < count; i++) + colors[i] = segment_colors[i]; /* Bound-checked read. */ } return numColors; }