[buffer-verify] Error handling

pull/4277/head
Behdad Esfahbod 1 year ago
parent 39dd777a12
commit cb516075b6
  1. 7
      src/hb-buffer-verify.cc

@ -185,6 +185,8 @@ buffer_verify_unsafe_to_break (hb_buffer_t *buffer,
}
bool ret = true;
if (likely (reconstruction->successful))
{
hb_buffer_diff_flags_t diff = hb_buffer_diff (reconstruction, buffer, (hb_codepoint_t) -1, 0);
if (diff & ~HB_BUFFER_DIFF_FLAG_GLYPH_FLAGS_MISMATCH)
{
@ -195,6 +197,7 @@ buffer_verify_unsafe_to_break (hb_buffer_t *buffer,
hb_buffer_set_length (buffer, 0);
hb_buffer_append (buffer, reconstruction, 0, -1);
}
}
hb_buffer_destroy (reconstruction);
hb_buffer_destroy (fragment);
@ -377,6 +380,8 @@ buffer_verify_unsafe_to_concat (hb_buffer_t *buffer,
hb_buffer_reverse (reconstruction);
}
if (likely (reconstruction->successful))
{
/*
* Diff results.
*/
@ -390,7 +395,7 @@ buffer_verify_unsafe_to_concat (hb_buffer_t *buffer,
hb_buffer_set_length (buffer, 0);
hb_buffer_append (buffer, reconstruction, 0, -1);
}
}
out:
hb_buffer_destroy (reconstruction);

Loading…
Cancel
Save