[configs] Fix builds with HB_NO_BUFFER_SERIALIZE but not HB_NO_BUFFER_VERIFY

e986c12075 (commitcomment-75339317)
This commit is contained in:
Behdad Esfahbod 2022-06-05 00:44:07 -06:00
parent 67852504f6
commit cb961eac5c
1 changed files with 2 additions and 0 deletions

View File

@ -418,6 +418,7 @@ hb_buffer_t::verify (hb_buffer_t *text_buffer,
ret = false; ret = false;
if (!ret) if (!ret)
{ {
#ifndef HB_NO_BUFFER_SERIALIZE
unsigned len = text_buffer->len; unsigned len = text_buffer->len;
hb_vector_t<char> bytes; hb_vector_t<char> bytes;
if (likely (bytes.resize (len * 10 + 16))) if (likely (bytes.resize (len * 10 + 16)))
@ -430,6 +431,7 @@ hb_buffer_t::verify (hb_buffer_t *text_buffer,
HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS); HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS);
buffer_verify_error (this, font, BUFFER_VERIFY_ERROR "text was: %s.", bytes.arrayZ); buffer_verify_error (this, font, BUFFER_VERIFY_ERROR "text was: %s.", bytes.arrayZ);
} }
#endif
} }
return ret; return ret;
} }