Index: third_party/harfbuzz-ng/src/hb-uniscribe.cc |
diff --git a/third_party/harfbuzz-ng/src/hb-uniscribe.cc b/third_party/harfbuzz-ng/src/hb-uniscribe.cc |
index 6bdf0f5c7fad77e82d3ff3722b7c69fa9015cb92..74ae3a39481c89af2b26632bb6f426708bb58917 100644 |
--- a/third_party/harfbuzz-ng/src/hb-uniscribe.cc |
+++ b/third_party/harfbuzz-ng/src/hb-uniscribe.cc |
@@ -24,9 +24,6 @@ |
* Google Author(s): Behdad Esfahbod |
*/ |
-#define _WIN32_WINNT 0x0600 |
-#define WIN32_LEAN_AND_MEAN |
- |
#define HB_SHAPER uniscribe |
#include "hb-shaper-impl-private.hh" |
@@ -248,7 +245,7 @@ retry: |
goto retry; |
} |
-#ifdef HAVE_ATEXIT |
+#ifdef HB_USE_ATEXIT |
atexit (free_uniscribe_funcs); /* First person registers atexit() callback. */ |
#endif |
} |
@@ -313,6 +310,7 @@ _hb_generate_unique_face_name (wchar_t *face_name, unsigned int *plen) |
const char *enc = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-"; |
UUID id; |
UuidCreate ((UUID*) &id); |
+ ASSERT_STATIC (2 + 3 * (16/2) < LF_FACESIZE); |
unsigned int name_str_len = 0; |
face_name[name_str_len++] = 'F'; |
face_name[name_str_len++] = '_'; |
@@ -905,8 +903,7 @@ retry: |
FAIL ("ScriptShapeOpenType() set fNoGlyphIndex"); |
if (unlikely (hr == E_OUTOFMEMORY)) |
{ |
- buffer->ensure (buffer->allocated * 2); |
- if (buffer->in_error) |
+ if (unlikely (!buffer->ensure (buffer->allocated * 2))) |
FAIL ("Buffer resize failed"); |
goto retry; |
} |
@@ -975,8 +972,7 @@ retry: |
#undef utf16_index |
- buffer->ensure (glyphs_len); |
- if (buffer->in_error) |
+ if (unlikely (!buffer->ensure (glyphs_len))) |
FAIL ("Buffer in error"); |
#undef FAIL |