[cpal] revert port to dagger

It has a different semantic, maybe we should just do a zero memset,
letting Behdad to decide.
This commit is contained in:
Ebrahim Byagowi 2019-07-30 18:10:40 +04:30 committed by GitHub
parent 8014ce198a
commit 521c7013ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -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;
}