File: 0003-Initialise-offsets.patch

package info (click to toggle)
r-cran-freetypeharfbuzz 0.2.6%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 524 kB
  • sloc: ansic: 370; sh: 74; makefile: 61
file content (34 lines) | stat: -rw-r--r-- 1,315 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From d1ea0b3ecb1739a8ebf168038dc5d664aed88206 Mon Sep 17 00:00:00 2001
From: Lionel Henry <lionel.hry@gmail.com>
Date: Sun, 19 Aug 2018 17:13:14 +0200
Subject: [PATCH 3/5] Initialise offsets

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

diff --git a/src/hb-subset-glyf.cc b/src/hb-subset-glyf.cc
index 0b84c856..0a01468e 100644
--- a/src/hb-subset-glyf.cc
+++ b/src/hb-subset-glyf.cc
@@ -48,7 +48,7 @@ _calculate_glyf_and_loca_prime_size (const OT::glyf::accelerator_t &glyf,
     *instruction_start = 0;
     *instruction_end = 0;
 
-    unsigned int start_offset, end_offset;
+    unsigned int start_offset = 0, end_offset = 0;
     if (unlikely (!(glyf.get_offsets(next_glyph, &start_offset, &end_offset)
                     && glyf.remove_padding(start_offset, &end_offset))))
     {
@@ -167,7 +167,7 @@ _write_glyf_and_loca_prime (hb_subset_plan_t              *plan,
   bool success = true;
   for (unsigned int i = 0; i < glyph_ids.len; i++)
   {
-    unsigned int start_offset, end_offset;
+    unsigned int start_offset = 0, end_offset = 0;
     if (unlikely (!(glyf.get_offsets (glyph_ids[i], &start_offset, &end_offset)
                     && glyf.remove_padding(start_offset, &end_offset))))
       end_offset = start_offset = 0;
-- 
2.15.2 (Apple Git-101.1)