From 47ef931f13778b894090139a64238a5ab9ac1154 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 19 Jul 2012 20:52:44 -0400 Subject: [PATCH] [buffer] Make sure out_info = info during GPOS --- src/hb-buffer.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index ec29659..2b4acff 100644 --- a/src/hb-buffer.cc +++ b/src/hb-buffer.cc @@ -126,7 +126,10 @@ hb_buffer_t::get_scratch_buffer (unsigned int *size) { have_output = false; have_positions = false; + out_len = 0; + out_info = info; + *size = allocated * sizeof (pos[0]); return pos; } @@ -153,12 +156,11 @@ hb_buffer_t::reset (void) idx = 0; len = 0; out_len = 0; + out_info = info; serial = 0; memset (allocated_var_bytes, 0, sizeof allocated_var_bytes); memset (allocated_var_owner, 0, sizeof allocated_var_owner); - - out_info = info; } void @@ -202,6 +204,9 @@ hb_buffer_t::clear_positions (void) have_output = false; have_positions = true; + out_len = 0; + out_info = info; + memset (pos, 0, sizeof (pos[0]) * len); } -- 2.7.4