未验证 提交 4b1b0bf2 编写于 作者: E Ebrahim Byagowi 提交者: GitHub

Merge pull request #1755 from ebraminio/slim

Don't use vsnprintf when HB_NO_BUFFER_MESSAGE is defined
......@@ -2026,7 +2026,10 @@ hb_buffer_set_message_func (hb_buffer_t *buffer,
bool
hb_buffer_t::message_impl (hb_font_t *font, const char *fmt, va_list ap)
{
#ifdef HB_NO_BUFFER_MESSAGE
return false;
#endif
char buf[100];
vsnprintf (buf, sizeof (buf), fmt, ap);
vsnprintf (buf, sizeof (buf), fmt, ap);
return (bool) this->message_func (this, font, buf, this->message_data);
}
......@@ -52,6 +52,7 @@
#define HB_DISABLE_DEPRECATED
#define HB_NDEBUG
#define HB_NO_ATEXIT
#define HB_NO_BUFFER_MESSAGE
#define HB_NO_BUFFER_SERIALIZE
#define HB_NO_BITMAP
#define HB_NO_CFF
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册