diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-07-12 22:19:38 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-07-12 22:19:38 -0400 |
commit | c31107167192a18130c4b096ef14ccba90ebf01a (patch) | |
tree | e6618a231bf20779a9d0b834ad116115255b6817 | |
parent | 0c1df3edb3a7aee3aef71c39db806194e8cb5b31 (diff) | |
download | pango-c31107167192a18130c4b096ef14ccba90ebf01a.tar.gz |
coverage: Fix the copy implementation
This should do a deep copy.
-rw-r--r-- | pango/pango-coverage.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pango/pango-coverage.c b/pango/pango-coverage.c index 7f18b583..e982bd3b 100644 --- a/pango/pango-coverage.c +++ b/pango/pango-coverage.c @@ -88,7 +88,16 @@ pango_coverage_real_copy (PangoCoverage *coverage) copy = g_object_new (PANGO_TYPE_COVERAGE, NULL); if (coverage->chars) - copy->chars = hb_set_reference (coverage->chars); + { + int i; + + copy->chars = hb_set_create (); + for (i = hb_set_get_min (coverage->chars); i <= hb_set_get_max (coverage->chars); i++) + { + if (hb_set_has (coverage->chars, (hb_codepoint_t)i)) + hb_set_add (copy->chars, (hb_codepoint_t)i); + } + } return copy; } |